

# Troubleshooting retrieval

To see what a retrieval request did, including the steps of an agentic retrieval, turn on trace delivery. For more information, see [Monitoring AWS Context with traces](monitoring-traces.md).

 **A request returns `ConflictException`.** The Agent context is still being allocated. Wait until it is active and its first ingestion has finished.

 **An MCP client authenticates but a tool call fails with status 403.** The identity lacks the tool’s `context:` action on the Agent context. Grant the action on the Agent context. `context:AgenticRetrieve` and `context:AgenticRetrieveStream` are separate. If the Agent context is in another account, its owner must also grant the action in the Agent context’s resource policy.

 **An MCP client connects but shows only 4 tools.** The client didn’t follow `nextCursor` on `tools/list`. Use a client that pages, or page `tools/list` yourself.

 **An MCP request fails with HTTP 401.** Credentials are missing or expired, or the request was signed for a service other than `context-mcp`. Run `aws sts get-caller-identity` with the same profile.

 ** `AgenticRetrieve` returns context but no answer.** The 100-second budget ran out. Narrow the question or use `AgenticRetrieveStream`.

 **Knowledge base entities are missing from results.** The identity that reads the connection, its data access role or the caller, lacks `bedrock:GetDocumentContent` on the knowledge base, or the caller’s session carries no trusted identity and the documents are access controlled. If another connection whose mapping was created earlier reaches the same knowledge base, that connection’s identity is the one that reads it (see [When several connections reach the same data](how-access-controls-apply-when-aws-context-queries-data.md#overlapping-connections)). Grant the permission to that identity, and see [Configure trusted identity propagation](configure-identity-propagation.md) for passing user identity.

 **The answer says a source could not be queried.** The identity that reads the source can’t read it. If the connection has a data access role, the role is missing, can’t be assumed, or can’t carry the user’s identity (with the legacy experience of trusted identity propagation, its trust policy needs `sts:SetContext`). If the connection uses the caller’s credentials, the caller lacks permission on the source. See [Configure trusted identity propagation](configure-identity-propagation.md).

 **An `ExecuteSql` query is rejected.** Check that every identifier is double-quoted and every table is listed in `tableArnList` by its full ARN. The statement must be a single `SELECT` or `WITH` with no write keywords or nonstandard string escapes.