Connect to tools
Tools are declarative. You list what the agent can call; AgentCore handles invocation, credentials, and results. The harness supports five tool types, plus the built-in filesystem and shell tools.
-
MCP servers: Connect to any remote Model Context Protocol
endpoint by URL. No Gateway required for simple cases. -
AgentCore Gateway: Governed connectivity to APIs and MCP servers with inbound/outbound auth, access control, and policy enforcement. Reference a gateway ARN and every tool configured on that gateway becomes available. Use Gateway when you need a managed, policy-backed tool surface.
-
AgentCore Browser: Managed web browsing and automation.
-
AgentCore Code Interpreter: Sandboxed Python/JavaScript/TypeScript code execution for data analysis and computation.
-
Inline functions: Tool schemas that execute on the client side, not on the harness VM. The harness pauses when the tool is called and returns the call to your code, which decides what to do and sends a result back. This is the pattern for human-in-the-loop approvals and custom integrations.
Default tools shell and file_operations are available in every session unless you restrict them with allowedTools. shell executes bash commands; file_operations supports viewing, creating, and editing files.
The allowedTools parameter controls which tools the agent can use. If omitted, all tools are allowed. Supported patterns:
| Pattern | Example | Matches |
|---|---|---|
|
|
|
All tools |
|
Plain name |
|
Builtin by name |
|
Builtin glob |
|
|
|
|
|
All builtin tools |
|
|
|
Specific builtin |
|
|
|
All tools from an MCP server |
|
|
|
Specific MCP tool |
|
|
|
Glob within a server |
|
|
|
Glob across servers |
Add tools
Example
Inline function calls
Inline functions let you define a tool that executes in your code, not on the harness. This is useful for human-in-the-loop approvals, calling internal APIs, or any logic you want to control client-side.
Example
Learn more about each tool:
Related topics
-
Configure agents and models - configure models and override per invocation
-
Environment and Skills - bring your own container and run shell commands
-
Security and access controls - control which tools the agent can access with policies