View a markdown version of this page

Step 3: Ask a question from your agent - AWS Context

Step 3: Ask a question from your agent

The MCP server provides your agent with tools to search the Agent Context, follow relationships between entities, and answer questions. The tool names start with context__AgenticRetrieve.

To ask a question

  1. In Claude Code, enter a prompt that names the Agent Context. Replace ac-agent-context-id with the ID that you copied in Step 1.

    Using the agent-context MCP server and agent context ac-agent-context-id, which customer has placed the most orders?
  2. When Claude Code prompts you, approve the tool call. Claude Code calls context_AgenticRetrieveagent-contextcontext_AgenticRetrieve.

    After about 15 seconds, the answer appears: Harper Johansson has placed the most orders, with 9.

    If Claude Code says that it can’t find the tools, wait a few seconds and try again. MCP servers can take a moment to connect when a session starts.

Tip

If you don’t know the Agent Context ID, ask your agent to list the Agent Contexts that you can access. It calls context___ListAgentContexts.