

# Retrieving context

 AWS Context is the service that builds an Agent context from your data. After you build one, your agents and applications retrieve from it in three ways, and you can combine them in one application:
+  **Search and traversal** are the low-level primitives. Use them when your own agent plans the retrieval: search finds entry points, and traversal follows the relationships around them.
+  **Agentic retrieval** answers a natural-language question for you. Use it when a question needs more than one search or hop, or needs data from a source.
+  **Read-only SQL** runs one query you write yourself over AWS Glue Data Catalog tables, with `ExecuteSql`. For more information, see [Query tables with ExecuteSql](query-tables-with-executesql.md).

You can call these operations through the AWS SDKs, or through the AWS Context Model Context Protocol (MCP) server, which exposes them as tools for any MCP client. You can also try [agentic retrieval](agentic-retrieval.md) in the console with **Chat with context**.

 AWS Context authorizes every request for the identity that signs it. That identity needs the AWS Identity and Access Management (IAM) action for the operation on the Agent context (`context:SearchAgentContext`, `context:TraverseAgentContext`, `context:AgenticRetrieveStream`, `context:AgenticRetrieve`, or `context:ExecuteSql`), and sees only the entities it is allowed to see. For a policy that grants these actions and the Agent context ARN format, see [Authentication and identity for MCP](authentication-and-identity-for-mcp.md). For how access is governed, see [Governing access](governing-access.md).

The Agent context must be active, and its connections must have finished their first ingestion, before it can serve requests. To check its connection status, see [Check connection status](check-connection-status.md). Every request passes the Agent context’s ID in the `agentContextId` parameter. The console shows the ID on the Agent context’s **Integration** tab, and `ListAgentContexts` returns it. To trace retrieval requests, see [Monitoring AWS Context with traces](monitoring-traces.md).

**Topics**
+ [Search and traverse an Agent context](search-and-traverse.md)
+ [Agentic retrieval](agentic-retrieval.md)
+ [Query tables with ExecuteSql](query-tables-with-executesql.md)
+ [The AWS Context MCP server](mcp-server.md)
+ [Use the AWS SDKs and agent frameworks](sdks-and-frameworks.md)
+ [Integrate with AWS Quick and other AWS consumers](integrate-with-quick-and-other-consumers.md)
+ [Quotas and limits for retrieval](quotas-and-limits-for-retrieval.md)
+ [Troubleshooting retrieval](troubleshooting-retrieval.md)