awslabs.amazon-bedrock-agentcore-mcp-server

v0.2.2
awslabs.amazon-bedrock-agentcore-mcp-server Checked 19 hours ago Published 14 days ago

Model Context Protocol (MCP) server for Amazon Bedrock AgentCore services

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_agentcore_docs

Search curated AgentCore documentation and return ranked results with snippets. This tool provides access to the complete Amazon Bedrock AgentCore documentation including: **Platform Overview:** - What is Bedrock AgentCore, security overview, quotas and limits **Platform Services:** - AgentCore Runtime (serverless deployment and scaling) - AgentCore Memory (persistent knowledge with event and semantic memory) - AgentCore Code Interpreter (secure code execution in isolated sandboxes) - AgentCore Browser (fast, secure cloud-based browser for web interaction)…

ParameterTypeDescription
query *string
kinteger

fetch_agentcore_doc

Fetch full document content by URL. Retrieves complete AgentCore documentation content from URLs found via search_agentcore_docs or provided directly. Use this to get full documentation pages including: - Complete platform overview and service documentation - Detailed getting started guides with step-by-step instructions - Full API reference documentation - Comprehensive tutorial and example code - Complete deployment and configuration instructions - Integration guides for various frameworks (Strands, LangGraph, CrewAI, etc.) This provides the full conten…

ParameterTypeDescription
uri *string

create_agent_runtime

Create a new AgentCore Runtime to host an agent or tool. This is a one-time setup operation that creates AWS infrastructure (IAM role binding, container deployment, endpoint). The DEFAULT endpoint is created automatically. Subsequent updates create new immutable versions. **Cost note:** Creating a runtime provisions infrastructure. You are not billed until sessions are invoked, but the runtime definition and its resources persist until deleted.

ParameterTypeDescription
agent_runtime_name *stringName for the runtime. Must match [a-zA-Z][a-zA-Z0-9_]{0,47}.
role_arn *stringIAM execution role ARN for the runtime.
code_entry_pointEntry point command as comma-separated values, e.g. "main.py" or "opentelemetry-instrument,main.py".
code_runtimePython runtime identifier for direct code deploy, e.g. PYTHON_3_13.
code_s3_bucketS3 bucket for direct code deployment.
code_s3_prefixS3 key/prefix for the code zip.
container_uriECR container URI. Provide either container_uri or the s3 code fields, not both.
descriptionDescription (max 4096 chars).
idle_timeoutIdle session timeout in seconds (60-28800). Default 900.
max_lifetimeMax session lifetime in seconds (60-28800). Default 28800.
network_modestringNetwork mode: "PUBLIC" or "VPC".
security_groupsComma-separated security group IDs (required for VPC mode).
server_protocolProtocol: "HTTP", "MCP", or "A2A".
subnetsComma-separated subnet IDs (required for VPC mode).

get_agent_runtime

Get details of an AgentCore Runtime including its configuration. This is a read-only operation with no cost implications.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID to retrieve.
agent_runtime_versionSpecific version to retrieve. Omit for latest.

update_agent_runtime

Update an AgentCore Runtime, creating a new immutable version. The DEFAULT endpoint automatically points to the new version. Custom endpoints must be updated separately. **Cost note:** Updating creates a new version. Active sessions continue using the previous version until they terminate.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID to update.
role_arn *stringIAM execution role ARN.
code_entry_pointUpdated entry point (comma-separated).
code_runtimeUpdated Python runtime identifier.
code_s3_bucketUpdated S3 bucket for code deploy.
code_s3_prefixUpdated S3 key/prefix for code zip.
container_uriUpdated ECR container URI.
descriptionUpdated description.
idle_timeoutUpdated idle timeout in seconds.
max_lifetimeUpdated max lifetime in seconds.
network_modestringNetwork mode: "PUBLIC" or "VPC".
security_groupsComma-separated SG IDs for VPC mode.
server_protocolUpdated protocol: "HTTP", "MCP", or "A2A".
subnetsComma-separated subnet IDs for VPC mode.

delete_agent_runtime

Delete an AgentCore Runtime and all its versions. All endpoints must be deleted first. Active sessions will be terminated. This operation cannot be undone.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID to delete.

list_agent_runtimes

List all AgentCore Runtimes in the account. This is a read-only operation with no cost implications.

ParameterTypeDescription
max_resultsMax results to return (1-100).
next_tokenPagination token from previous response.

list_agent_runtime_versions

List all versions of a specific AgentCore Runtime. This is a read-only operation with no cost implications.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID to list versions for.
max_resultsMax results (1-100).
next_tokenPagination token.

create_agent_runtime_endpoint

Create a custom endpoint for an AgentCore Runtime. Endpoints provide stable access points to specific runtime versions. The DEFAULT endpoint is created automatically; use this for additional environments (dev, staging, prod). This is a configuration operation with no per-use cost.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID to create the endpoint for.
name *stringEndpoint name. Must match [a-zA-Z][a-zA-Z0-9_]{0,47}.
agent_runtime_versionVersion to point to. Omit to use latest.
descriptionEndpoint description (max 256 chars).

get_agent_runtime_endpoint

Get details of a specific runtime endpoint. Read-only, no cost implications.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID.
endpoint_name *stringEndpoint name to retrieve.

update_agent_runtime_endpoint

Update an endpoint to point to a different runtime version. Enables zero-downtime version transitions and rollbacks. Configuration-only, no per-use cost.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID.
endpoint_name *stringEndpoint name to update.
agent_runtime_versionNew version to point the endpoint to.
descriptionUpdated description.

delete_agent_runtime_endpoint

Delete a runtime endpoint. Cannot delete the DEFAULT endpoint. This operation cannot be undone.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID.
endpoint_name *stringEndpoint name to delete.

list_agent_runtime_endpoints

List all endpoints for an AgentCore Runtime. Read-only, no cost implications.

ParameterTypeDescription
agent_runtime_id *stringRuntime ID to list endpoints for.
max_resultsMax results (1-100).
next_tokenPagination token.

invoke_agent_runtime

Invoke an agent hosted in AgentCore Runtime. Sends a request to the agent and returns the response. Each invocation uses or creates a microVM session identified by runtime_session_id. **BILLABLE OPERATION:** This creates or reuses a microVM session that incurs AWS compute charges for the duration of the session. Sessions auto-terminate after the configured idle timeout (default 15 minutes). Use stop_runtime_session to terminate early and save costs.

ParameterTypeDescription
agent_runtime_arn *stringARN of the agent runtime to invoke, e.g. "arn:aws:bedrock-agentcore:us-west-2:123:runtime/my-agent".
payload *stringJSON payload to send to the agent, e.g. '{"prompt": "Hello"}'.
qualifierstringEndpoint name/qualifier. Defaults to DEFAULT.
runtime_session_idSession ID (33-256 chars). Reuse the same ID for multi-turn conversations. Auto-generated if omitted.

stop_runtime_session

Stop a running runtime session to release its microVM. Use this to terminate sessions early and **save costs** instead of waiting for the idle timeout (default 15 minutes). This is the recommended cleanup action after your agent conversation is complete. This is a cost-saving operation that prevents runaway charges from idle sessions.

ParameterTypeDescription
agent_runtime_arn *stringARN of the agent runtime.
runtime_session_id *stringSession ID to stop (33-256 chars).
qualifierstringEndpoint qualifier. Defaults to DEFAULT.

get_runtime_guide

Get a comprehensive reference guide for AgentCore Runtime. Covers CLI commands, agentcore.json schema, protocol contracts, session lifecycle, IAM permissions, cost tiers, common patterns, troubleshooting, and migration notes. Read-only, no cost implications.

memory_create

Create a new AgentCore Memory resource. COST WARNING: Creating a memory resource provisions AWS infrastructure. This incurs AWS charges. Memory strategies that process events (extraction, consolidation) consume additional compute resources. The memory resource starts in CREATING status and transitions to ACTIVE when ready. Use memory_get to check status. Returns the created memory resource details including its ID.

ParameterTypeDescription
event_expiry_duration *integerDays after which memory events expire (3-365)
name *stringUnique name for the memory resource. Pattern: [a-zA-Z][a-zA-Z0-9_]{0,47}
descriptionDescription of the memory resource (1-4096 chars)
encryption_key_arnKMS key ARN for encryption
memory_execution_role_arnIAM role ARN for memory execution
memory_strategiesList of memory strategy configurations. Each is a union with one key: semanticMemoryStrategy, summaryMemoryStrategy, userPreferenceMemoryStrategy, episodicMemoryStrategy, or customMemoryStrategy. Each…
tagsTags as key-value pairs (max 50)

memory_get

Get details of an AgentCore Memory resource. Returns the memory resource including status, strategies, configuration, and timestamps. This is a read-only operation with no cost implications.

ParameterTypeDescription
memory_id *stringMemory resource ID (min 12 chars)

memory_update

Update an AgentCore Memory resource. COST WARNING: Adding new memory strategies may increase processing costs as new strategies will process incoming events. Can update description, event expiry, execution role, and strategies (add, modify, or delete). Returns the updated memory details.

ParameterTypeDescription
memory_id *stringMemory resource ID to update
descriptionUpdated description (1-4096 chars)
event_expiry_durationUpdated event expiry in days (3-365)
memory_execution_role_arnUpdated IAM role ARN
memory_strategiesStrategy modifications. Object with optional keys: "addMemoryStrategies" (list of strategy inputs), "deleteMemoryStrategies" (list of {memoryStrategyId}), "modifyMemoryStrategies" (list of modificatio…

memory_delete

Delete an AgentCore Memory resource. WARNING: This permanently deletes the memory resource and all associated data (events, memory records, strategies). This action cannot be undone.

ParameterTypeDescription
memory_id *stringMemory resource ID to delete

memory_list

List all AgentCore Memory resources in the account. Returns memory summaries with IDs, ARNs, status, and timestamps. This is a read-only operation with no cost implications.

ParameterTypeDescription
max_resultsMax results per page (1-100)
next_tokenPagination token from previous response

memory_create_event

Create an event in an AgentCore Memory resource (short-term memory). COST WARNING: Creating events triggers background long-term memory extraction if strategies are configured. This consumes compute resources and incurs AWS charges. Events represent interactions (messages, tool calls) within a session. They are immutable and timestamped.

ParameterTypeDescription
actor_id *stringActor identifier (1-255 chars). Pattern: [a-zA-Z0-9][a-zA-Z0-9-_/]*
memory_id *stringMemory resource ID
payload *arrayContent payload (0-100 items). Each item is a PayloadType union — typically conversational messages with "role" and "content" fields.
branchBranch info for threading. Object with "name" and optional "rootEventId".
event_timestampEvent timestamp (epoch seconds). Defaults to now.
metadataKey-value metadata (0-15 entries, keys 1-128 chars)
session_idSession identifier (1-100 chars). Groups events into conversations. Pattern: [a-zA-Z0-9][a-zA-Z0-9-_]*

memory_get_event

Get a specific event from an AgentCore Memory resource. Retrieves full event details including payload and metadata. This is a read-only operation with no cost implications.

ParameterTypeDescription
actor_id *stringActor identifier
event_id *stringEvent identifier. Pattern: [0-9]+#[a-fA-F0-9]+
memory_id *stringMemory resource ID
session_id *stringSession identifier

memory_delete_event

Permanently delete an event from an AgentCore Memory resource. WARNING: This permanently removes the event. This action cannot be undone. Already-extracted long-term memory records are not affected.

ParameterTypeDescription
actor_id *stringActor identifier
event_id *stringEvent identifier to delete
memory_id *stringMemory resource ID
session_id *stringSession identifier

memory_list_events

List events in an AgentCore Memory resource. Lists events for a specific actor and session with optional filtering by branch or metadata. This is a read-only operation.

ParameterTypeDescription
actor_id *stringActor identifier
memory_id *stringMemory resource ID
session_id *stringSession identifier
event_filterFilter criteria. Object with optional "branch" (name, includeParentBranches) and "eventMetadata" (list of filter expressions).
include_payloadsWhether to include event payloads
max_resultsMax results per page (1-100, default 20)
next_tokenPagination token

memory_list_actors

List all actors in an AgentCore Memory resource. Returns actor summaries (actor IDs) for the memory. This is a read-only operation with no cost implications.

ParameterTypeDescription
memory_id *stringMemory resource ID
max_resultsMax results per page (1-100, default 20)
next_tokenPagination token

memory_list_sessions

List sessions for an actor in an AgentCore Memory resource. Returns session summaries with session IDs, actor IDs, and creation timestamps. This is a read-only operation.

ParameterTypeDescription
actor_id *stringActor identifier
memory_id *stringMemory resource ID
max_resultsMax results per page (1-100, default 20)
next_tokenPagination token

memory_get_record

Get a specific memory record from an AgentCore Memory resource. Returns the full record including content, metadata, namespaces, and strategy ID. This is a read-only operation.

ParameterTypeDescription
memory_id *stringMemory resource ID
memory_record_id *stringMemory record ID (40-50 chars). Pattern: mem-[a-zA-Z0-9-_]*

memory_delete_record

Permanently delete a memory record from an AgentCore Memory resource. WARNING: This permanently removes the memory record. This action cannot be undone.

ParameterTypeDescription
memory_id *stringMemory resource ID
memory_record_id *stringMemory record ID to delete (pattern: mem-...)

memory_list_records

List memory records in an AgentCore Memory resource. Returns memory record summaries filtered by namespace and optionally by strategy. This is a read-only operation.

ParameterTypeDescription
memory_id *stringMemory resource ID
namespace *stringNamespace prefix filter (1-1024 chars). Returns all records in namespaces starting with this prefix.
max_resultsMax results per page (1-100, default 20)
memory_strategy_idFilter by memory strategy ID
next_tokenPagination token

memory_retrieve_records

Semantic search for memory records in an AgentCore Memory resource. COST WARNING: Semantic search invokes embedding and retrieval infrastructure. Each call incurs compute charges. Searches long-term memory records by semantic similarity to the query. Returns results ordered by relevance score. Use this to retrieve contextually relevant memories for agent responses.

ParameterTypeDescription
memory_id *stringMemory resource ID
namespace *stringNamespace prefix filter (1-1024 chars)
search_query *stringSemantic search query for finding relevant records (1-10000 chars)
max_resultsMax results per page (1-100, default 20)
memory_strategy_idFilter by memory strategy ID
next_tokenPagination token
top_kMax top-scoring records to return (1-100)

memory_batch_create_records

Batch create memory records in an AgentCore Memory resource. COST WARNING: Creating memory records consumes storage and indexing resources. Each record incurs charges. Creates up to 100 memory records in a single call. Each record must include content, namespaces, a request identifier, and a timestamp.

ParameterTypeDescription
memory_id *stringMemory resource ID
records *arrayRecords to create (0-100 items). Each record requires: "content" (MemoryContent union, typically {"text": "..."}), "namespaces" (list of 0-1 strings), "requestIdentifier" (unique string 1-80 chars), "…

memory_batch_update_records

Batch update memory records in an AgentCore Memory resource. Updates up to 100 memory records in a single call. Each record must include its ID and a timestamp.

ParameterTypeDescription
memory_id *stringMemory resource ID
records *arrayRecords to update (0-100 items). Each requires: "memoryRecordId" (pattern: mem-...), "timestamp" (epoch seconds). Optional: "content", "memoryStrategyId", "namespaces".

memory_batch_delete_records

Batch delete memory records from an AgentCore Memory resource. WARNING: This permanently deletes up to 100 memory records in a single call. This action cannot be undone.

ParameterTypeDescription
memory_id *stringMemory resource ID
records *arrayRecords to delete (0-100 items). Each requires: "memoryRecordId" (pattern: mem-[a-zA-Z0-9-_]*).

memory_list_extraction_jobs

List memory extraction jobs for an AgentCore Memory resource. Returns extraction job metadata including status, actor/session IDs, and failure reasons. This is a read-only operation.

ParameterTypeDescription
memory_id *stringMemory resource ID
extraction_filterFilter criteria. Object with optional keys: "actorId", "sessionId", "status" (e.g. "FAILED"), "strategyId".
max_resultsMax results per page (1-50, default 20)
next_tokenPagination token

memory_start_extraction_job

Start (or restart) a memory extraction job. COST WARNING: Extraction jobs consume compute resources to process events and produce memory records. This incurs AWS charges. Typically used to retry previously failed extraction jobs. The job processes events and produces structured long-term memory records.

ParameterTypeDescription
job_id *stringExtraction job ID to restart
memory_id *stringMemory resource ID

get_memory_guide

Get the comprehensive AgentCore Memory guide. Returns a detailed reference covering: CLI commands, agentcore.json schema, memory strategies, cost tiers, common patterns, troubleshooting, IAM permissions, and migration notes. This is a read-only operation with no cost implications.

identity_create_workload_identity

Create a new AgentCore workload identity. COST WARNING: Creates a workload identity resource in AgentCore Identity. Workload identities themselves are free, but the workload access tokens they issue are used to retrieve stored credentials from the token vault. Returns the created workload identity details including its ARN.

ParameterTypeDescription
name *stringUnique workload identity name (3-255 chars). Pattern: [A-Za-z0-9_.-]+
allowed_resource_oauth2_return_urlsAllowed OAuth2 return URLs for resources accessed by this workload (1-2048 chars each). Required before using 3LO flows with a custom callback URL.
tagsTags as key-value pairs (max 50)

identity_get_workload_identity

Get details of an AgentCore workload identity. Returns the workload identity including allowed OAuth2 return URLs, ARN, and timestamps. This is a read-only operation with no cost implications.

ParameterTypeDescription
name *stringWorkload identity name (3-255 chars)

identity_update_workload_identity

Update an AgentCore workload identity. Replaces the allowed OAuth2 return URLs list. This is a config change only — the workload identity ARN and name are immutable.

ParameterTypeDescription
name *stringWorkload identity name to update (3-255 chars)
allowed_resource_oauth2_return_urlsNew list of allowed OAuth2 return URLs (replaces existing list). Each URL 1-2048 chars.

identity_delete_workload_identity

Permanently delete an AgentCore workload identity. WARNING: This permanently deletes the workload identity. Any agents or code relying on this identity will no longer be able to authenticate. This action cannot be undone.

ParameterTypeDescription
name *stringWorkload identity name to delete (3-255 chars)

identity_list_workload_identities

List AgentCore workload identities in the account. Returns workload identity summaries with names and ARNs. This is a read-only operation with no cost implications.

ParameterTypeDescription
max_resultsMax results per page (1-20)
next_tokenPagination token from previous response

identity_create_api_key_provider

Create an API key credential provider in AgentCore Identity. COST WARNING: Creates a secret in AWS Secrets Manager (backing the credential provider) and incurs Secrets Manager storage charges. SECURITY NOTE: The api_key parameter value flows through LLM context when this tool is called by an AI assistant. For production secrets, strongly prefer the CLI: agentcore add credential --name <n> --api-key <key> The CLI accepts the key without it entering LLM conversation history. Use this MCP tool for test credentials, automation…

ParameterTypeDescription
api_key *stringAPI key value to store (1-65536 chars). Encrypted at rest in AWS Secrets Manager via the token vault.
name *stringUnique credential provider name (1-128 chars). Pattern: [a-zA-Z0-9\-_]+
tagsTags as key-value pairs (max 50)

identity_get_api_key_provider

Get metadata for an API key credential provider. Returns the provider ARN, the ARN of the backing Secrets Manager secret, and timestamps. Does NOT return the API key value itself — that is only retrievable at runtime by workloads with a valid workload identity token (via the SDK, not via MCP). This is a read-only operation with no cost implications.

ParameterTypeDescription
name *stringCredential provider name (1-128 chars)

identity_update_api_key_provider

Update the API key stored in an existing credential provider. COST WARNING: Rotates the secret in AWS Secrets Manager. Continues to incur Secrets Manager storage charges. SECURITY NOTE: The api_key parameter value flows through LLM context when this tool is called by an AI assistant. For production key rotation, strongly prefer the CLI: agentcore add credential --name <n> --api-key <key> (re-running `add` with the same name rotates the key without the value entering LLM conversation history). Returns updated provide…

ParameterTypeDescription
api_key *stringNew API key value (1-65536 chars). Replaces the existing key stored in Secrets Manager.
name *stringCredential provider name to update (1-128 chars)

identity_delete_api_key_provider

Permanently delete an API key credential provider. WARNING: This permanently deletes the credential provider and its backing secret. Any agents or workloads retrieving the key via this provider will fail. This action cannot be undone.

ParameterTypeDescription
name *stringCredential provider name to delete (1-128 chars)

identity_list_api_key_providers

List API key credential providers in the account. Returns provider summaries with names, ARNs, and timestamps. Does NOT return API key values. This is a read-only operation with no cost implications.

ParameterTypeDescription
max_resultsMax results per page (1-100)
next_tokenPagination token from previous response

identity_create_oauth2_provider

Create an OAuth2 credential provider in AgentCore Identity. COST WARNING: Creates a secret in AWS Secrets Manager (holding the client_secret) and incurs Secrets Manager storage charges. SECURITY NOTE: The clientSecret inside oauth2_provider_config_input flows through LLM context when this tool is called by an AI assistant. For production secrets, strongly prefer the CLI: agentcore add credential --name <n> --type oauth \ --discovery-url <url> --client-id <id> \ --client-secret <secret> --scopes <scope1,scope2>…

ParameterTypeDescription
credential_provider_vendor *stringOAuth2 vendor. One of: GoogleOauth2, GithubOauth2, SlackOauth2, SalesforceOauth2, MicrosoftOauth2, CustomOauth2, AtlassianOauth2, LinkedinOauth2, XOauth2, OktaOauth2, OneLoginOauth2, PingOneOauth2, Fa…
name *stringUnique provider name (1-128 chars). Pattern: [a-zA-Z0-9\-_]+
oauth2_provider_config_input *objectVendor-specific OAuth2 config as a union — specify exactly one of: googleOauth2ProviderConfig, githubOauth2ProviderConfig, slackOauth2ProviderConfig, salesforceOauth2ProviderConfig, microsoftOauth2P…
tagsTags as key-value pairs (max 50)

identity_get_oauth2_provider

Get metadata for an OAuth2 credential provider. Returns the provider ARN, vendor, callback URL, Secrets Manager secret ARN, OAuth2 discovery output, and timestamps. Does NOT return the client_secret value — that is stored in Secrets Manager and only used server-side during token exchanges. This is a read-only operation with no cost implications.

ParameterTypeDescription
name *stringProvider name (1-128 chars)

identity_update_oauth2_provider

Update an OAuth2 credential provider's configuration. COST WARNING: Rotates the secret in AWS Secrets Manager. Continues to incur Secrets Manager storage charges. SECURITY NOTE: The clientSecret inside oauth2_provider_config_input flows through LLM context when this tool is called by an AI assistant. For production secret rotation, strongly prefer the CLI (re-running `agentcore add credential` with the same name rotates the credential without the value entering LLM history). Returns updated provider metadata. The provider ARN a…

ParameterTypeDescription
credential_provider_vendor *stringOAuth2 vendor (must match the existing vendor).
name *stringProvider name to update (1-128 chars)
oauth2_provider_config_input *objectUpdated vendor-specific OAuth2 config as a union. Same shape as on create — contains clientId, clientSecret, and (for CustomOauth2) oauthDiscovery.

identity_delete_oauth2_provider

Permanently delete an OAuth2 credential provider. WARNING: This permanently deletes the credential provider and its backing secret. Any agents or workloads retrieving tokens via this provider will fail. Any stored 3LO user consents tied to this provider are lost. This action cannot be undone.

ParameterTypeDescription
name *stringProvider name to delete (1-128 chars)

identity_list_oauth2_providers

List OAuth2 credential providers in the account. Returns provider summaries with names, ARNs, vendors, and timestamps. Does NOT return client secrets. This is a read-only operation with no cost implications.

ParameterTypeDescription
max_resultsMax results per page (1-20)
next_tokenPagination token from previous response

identity_get_token_vault

Get details of an AgentCore Identity token vault. Returns the token vault ID, KMS configuration (key type and key ARN), and last-modified timestamp. This is a read-only operation with no cost implications.

ParameterTypeDescription
token_vault_idToken vault ID (1-64 chars). Omit to get the default token vault for the account.

identity_set_token_vault_cmk

Set the customer master key (CMK) for an AgentCore Identity token vault. COST WARNING: Switching to a CustomerManagedKey incurs AWS KMS charges for every encryption and decryption request against secrets in the vault (each stored credential). Switching back to ServiceManagedKey stops these KMS charges. SECURITY NOTE: This operation changes how credentials stored in the vault are encrypted. Ensure the KMS key policy grants the AgentCore service principal the necessary permissions (kms:Decrypt, kms:Encrypt, kms:GenerateDataKey, km…

ParameterTypeDescription
kms_configuration *objectKMS configuration. An object with keys: "keyType" (either "CustomerManagedKey" or "ServiceManagedKey") and "kmsKeyArn" (required when keyType is CustomerManagedKey; an ARN like arn:aws:kms:region:acco…
token_vault_idToken vault ID (1-64 chars). Omit to update the default token vault.

identity_put_resource_policy

Create or replace the resource-based policy on an AgentCore resource. ACCESS CONTROL WARNING: This modifies who can invoke or manage the target resource. Overly permissive policies (e.g. broad Principal wildcards or cross-account access) can expose the resource to unintended callers. Review policy documents carefully before applying, and prefer least-privilege statements scoped to specific principals and actions. This is an idempotent replace — it overwrites any existing policy on the resource.

ParameterTypeDescription
policy_document *objectIAM-style resource-based policy document as a JSON object. Must include "Version" and "Statement" fields. Each statement needs Effect (Allow|Deny), Principal, Action, and Resource. Example: {"Version"…
resource_arn *stringARN of the AgentCore resource to attach the policy to. Supported: Agent Runtime, Agent Runtime Endpoint, Gateway.

identity_get_resource_policy

Get the resource-based policy attached to an AgentCore resource. Returns the policy as a JSON object. If no policy is attached, returns a success response with an empty policy. This is a read-only operation with no cost implications.

ParameterTypeDescription
resource_arn *stringARN of the AgentCore resource.

identity_delete_resource_policy

Permanently delete the resource-based policy on an AgentCore resource. WARNING: Removes ALL access-control statements from the target resource. After deletion, only principals authorized by identity-based IAM policies (not resource-based policies) can invoke or manage the resource. This action cannot be undone.

ParameterTypeDescription
resource_arn *stringARN of the AgentCore resource.

get_identity_guide

Get the comprehensive AgentCore Identity guide. Returns a detailed reference covering: prerequisites, cost tiers, data-plane exclusion rationale, CLI commands, agentcore.json schema, OAuth2 provider config shapes, common patterns, troubleshooting, IAM permissions, and migration notes. This is a read-only operation with no cost implications.

gateway_create

Create a new AgentCore Gateway resource. COST WARNING: Creating a gateway provisions AWS infrastructure and incurs AWS charges. Gateway invocations are billed separately per request. A workload identity is also auto-created alongside the gateway. The gateway starts in CREATING status and transitions to READY when ready for invocation. Use gateway_get to check status. The returned gatewayUrl is the endpoint for MCP invocations; tools are added via gateway_target_create. Returns the created gateway details including its I…

ParameterTypeDescription
authorizer_type *stringInbound authorization type: "CUSTOM_JWT", "AWS_IAM", or "NONE". NONE gateways are unauthenticated and should only be used for public production endpoints with other security layers in place.
name *stringUnique gateway name. Pattern: ([0-9a-zA-Z][-]?){1,100}
protocol_type *stringProtocol type for the gateway. Currently only "MCP".
role_arn *stringIAM service role ARN that AgentCore assumes to invoke targets. Must trust bedrock-agentcore.amazonaws.com.
authorizer_configurationAuthorizer config. Required when authorizer_type is "CUSTOM_JWT". Shape: {"customJWTAuthorizer": {"discoveryUrl": "...", "allowedClients": [...], "allowedAudience": [...], "allowedScopes": [...]}}.
client_tokenIdempotency token (33-256 chars)
descriptionGateway description (1-200 chars)
exception_levelError detail level. Set to "DEBUG" during development to return detailed errors on invocation. Omit for production to return generic errors only.
interceptor_configurationsLambda interceptors (1-2 items). Each has: "interceptor": {"lambda": {"arn": "..."}}, "interceptionPoints": ["REQUEST" | "RESPONSE"], optional "inputConfiguration": {"passRequestHeaders": bool}.
kms_key_arnCustomer-managed KMS key ARN for at-rest encryption. Omit to use the AWS-managed key.
policy_engine_configurationPolicy engine association. Shape: {"arn": "<policy-engine-arn>", "mode": "LOG_ONLY" | "ENFORCE"}.
protocol_configurationProtocol-specific settings. For MCP: {"mcp": {"searchType": "SEMANTIC", "instructions": "...", "supportedVersions": [...]}}. searchType enables the built-in x_amz_bedrock_agentcore_search tool and can…
tagsTags as key-value pairs (max 50)

gateway_get

Get details of an AgentCore Gateway. Returns the gateway including status, authorizer configuration, URL, protocol settings, and associated workload identity. This is a read-only operation with no cost implications.

ParameterTypeDescription
gateway_identifier *stringGateway ID. Pattern: ([0-9a-z][-]?){1,100}-[0-9a-z]{10}

gateway_update

Update an AgentCore Gateway. COST WARNING: Adding or enabling interceptors adds Lambda invocation costs on every gateway request. Policy engine enforcement may also affect latency and cost profile. Note: UpdateGateway requires all fields that were part of the create call — even ones you aren't changing — or the existing values will be replaced. Fetch with gateway_get first, then pass through the existing values for fields you don't want to change. Returns the updated gateway details.

ParameterTypeDescription
authorizer_type *stringInbound auth: "CUSTOM_JWT", "AWS_IAM", or "NONE"
gateway_identifier *stringGateway ID to update
name *stringGateway name. Must match the original creation name. Pattern: ([0-9a-zA-Z][-]?){1,100}
protocol_type *stringProtocol type. Currently only "MCP".
role_arn *stringUpdated IAM service role ARN
authorizer_configurationUpdated authorizer config (required for CUSTOM_JWT)
descriptionUpdated description (1-200 chars)
exception_levelError detail level. Set to "DEBUG" to enable detailed errors; omit to disable.
interceptor_configurationsUpdated interceptor configs (1-2 items)
kms_key_arnUpdated KMS key ARN
policy_engine_configurationUpdated policy engine config
protocol_configurationUpdated protocol config

gateway_delete

Delete an AgentCore Gateway. WARNING: This permanently deletes the gateway. All associated targets and the auto-created workload identity are removed. Agents pointing to this gateway's URL will fail to invoke. This action cannot be undone. Note: You may need to delete gateway targets first if the gateway has any; otherwise the API will return a ConflictException.

ParameterTypeDescription
gateway_identifier *stringGateway ID to delete

gateway_list

List all AgentCore Gateways in the account. Returns gateway summaries with IDs, names, authorizer types, status, and timestamps. This is a read-only operation with no cost implications.

ParameterTypeDescription
max_resultsMax results per page (1-1000)
next_tokenPagination token from previous response

gateway_target_create

Create a new gateway target to expose tools through a gateway. COST WARNING: Target creation is free, but tool invocations through the gateway (Lambda calls, REST API calls, MCP server calls) incur per-request costs against the underlying services. For mcpServer targets, target creation triggers an implicit synchronization that calls the MCP server's tools/list — this may take several minutes for large tool sets. The target starts in CREATING status and transitions to READY when available. For mcpServer targets, status may als…

ParameterTypeDescription
gateway_identifier *stringGateway ID to attach the target to
name *stringUnique target name within the gateway. Pattern: ([0-9a-zA-Z][-]?){1,100}. Tool names exposed via MCP are prefixed with this name, e.g. "${target_name}___${tool_name}".
target_configuration *objectTarget endpoint and schema config. Union with one key under "mcp": "lambda", "apiGateway", "openApiSchema", "smithyModel", or "mcpServer". Examples: {"mcp":{"lambda":{"lambdaArn":"...","toolSchema":{.…
client_tokenIdempotency token (33-256 chars)
credential_provider_configurationsOutbound auth (exactly 1 item if provided). Each: {"credentialProviderType": "GATEWAY_IAM_ROLE" | "OAUTH" | "API_KEY", "credentialProvider": {...}}. For OAUTH/API_KEY, credentialProvider references a…
descriptionTarget description (1-200 chars)
metadata_configurationHeader/query parameter propagation. Shape: {"allowedRequestHeaders": [...], "allowedResponseHeaders": [...], "allowedQueryParameters": [...]}. Max 10 items each. Restricted headers (Authorization, Con…

gateway_target_get

Get details of a gateway target. Returns the target including status, credential provider config, target configuration, metadata configuration, and sync timestamps. This is a read-only operation with no cost implications.

ParameterTypeDescription
gateway_identifier *stringGateway ID
target_id *stringTarget ID. Pattern: [0-9a-zA-Z]{10}

gateway_target_update

Update an existing gateway target. COST WARNING: For mcpServer targets, updating triggers implicit synchronization with the MCP server's tools/list endpoint, which can take several minutes for large tool sets. Updates the target configuration, credentials, metadata, or description. Returns the updated target details.

ParameterTypeDescription
gateway_identifier *stringGateway ID
name *stringUpdated target name
target_configuration *objectUpdated target configuration (same shape as create)
target_id *stringTarget ID to update
credential_provider_configurationsUpdated credential provider config (1 item)
descriptionUpdated description (1-200 chars)
metadata_configurationUpdated header/query propagation config

gateway_target_delete

Delete a gateway target. WARNING: This permanently removes the target from the gateway. Tools exposed via this target will no longer be available to agents. This action cannot be undone.

ParameterTypeDescription
gateway_identifier *stringGateway ID
target_id *stringTarget ID to delete

gateway_target_list

List all targets attached to a gateway. Returns target summaries with IDs, names, status, and timestamps. This is a read-only operation with no cost implications.

ParameterTypeDescription
gateway_identifier *stringGateway ID whose targets to list
max_resultsMax results per page (1-1000)
next_tokenPagination token

gateway_target_synchronize

Explicitly synchronize gateway targets with their upstream tool catalog. COST WARNING: Synchronization calls the MCP server's tools/list endpoint and re-indexes the tool catalog (including rebuilding semantic search embeddings if enabled). This incurs compute costs and can take several minutes for large tool sets. The API returns a 202 response and processes asynchronously — monitor progress via gateway_target_get. Use this for mcpServer targets when the upstream MCP server has added, removed, or changed tools. CreateGatewayTa…

ParameterTypeDescription
gateway_identifier *stringGateway ID
target_id_list *arrayTarget IDs to synchronize (exactly 1 item). Pattern per item: [0-9a-zA-Z]{10}.

gateway_resource_policy_put

Create or update a resource-based policy on a gateway. COST WARNING: The policy itself is free, but misconfigured policies can expose a gateway to unintended principals — review carefully before applying. Creates or replaces the resource policy attached to the specified gateway. Use this to grant cross-account access or to restrict access beyond what inbound authorization provides.

ParameterTypeDescription
policy *stringIAM resource policy document as a JSON string (1-20480 chars). Must specify Principal, Action, Resource, and Effect per standard IAM policy syntax.
resource_arn *stringARN of the gateway (or runtime) resource the policy applies to. 20-1011 chars.

gateway_resource_policy_get

Get the resource-based policy attached to a gateway. Returns the raw JSON policy document. This is a read-only operation with no cost implications.

ParameterTypeDescription
resource_arn *stringARN of the gateway resource (20-1011 chars)

gateway_resource_policy_delete

Delete the resource-based policy attached to a gateway. WARNING: This removes all permissions granted by the resource policy. Principals that relied on the policy for access will no longer be able to invoke the gateway. This action cannot be undone.

ParameterTypeDescription
resource_arn *stringARN of the gateway resource (20-1011 chars)

get_gateway_guide

Get the comprehensive AgentCore Gateway guide. Returns a detailed reference covering: prerequisites, tool cost tiers, excluded operations and security notes, CLI commands, agentcore.json schema, target types, common patterns, debugging, troubleshooting, IAM permissions, and migration notes. This is a read-only operation with no cost implications.

policy_engine_create

Create a new AgentCore Policy Engine. COST WARNING: Creating a policy engine provisions AWS infrastructure and incurs AWS charges. The engine starts in CREATING status and transitions to ACTIVE when ready. Use policy_engine_get to poll the status. Returns the created policy engine details including its ID and ARN.

ParameterTypeDescription
name *stringImmutable name for the policy engine, unique within the account. Pattern: [A-Za-z][A-Za-z0-9_]*, max 48 chars.
client_tokenIdempotency token (33-256 chars)
descriptionPurpose and scope of the policy engine (1-4096 chars)
encryption_key_arnKMS key ARN for encryption at rest
tagsTags as key-value pairs (max 50)

policy_engine_get

Get details of an AgentCore Policy Engine. Returns the policy engine including status, encryption config, and timestamps. This is a read-only operation with no cost implications.

ParameterTypeDescription
policy_engine_id *stringPolicy engine ID (12-59 chars). Pattern: [A-Za-z][A-Za-z0-9_]*-[a-z0-9_]{10}

policy_engine_update

Update an AgentCore Policy Engine. Currently only the description can be updated. The engine's name and encryption configuration are immutable after creation.

ParameterTypeDescription
policy_engine_id *stringPolicy engine ID to update
descriptionUpdatedDescription object with "optionalValue" key. Set {"optionalValue": "new text"} to change the description, or {"optionalValue": null} to clear it. Omit the parameter entirely to leave the descri…

policy_engine_delete

Delete an AgentCore Policy Engine. WARNING: This permanently deletes the policy engine. The engine must not have any associated policies before deletion — delete all policies first with policy_delete, then delete the engine. This action cannot be undone.

ParameterTypeDescription
policy_engine_id *stringPolicy engine ID to delete

policy_engine_list

List AgentCore Policy Engines in the account. Returns policy engine summaries with IDs, ARNs, status, and timestamps. This is a read-only operation with no cost implications.

ParameterTypeDescription
max_resultsMax results per page (1-100, default 10)
next_tokenPagination token from previous response

policy_create

Create a Cedar policy within an AgentCore Policy Engine. COST WARNING: Creating a policy invokes the validation pipeline and provisions a billable policy resource. This incurs AWS charges. Policies are validated against the Cedar schema derived from the parent policy engine's associated Gateway tools. Create is asynchronous — the policy starts in CREATING and transitions to ACTIVE or CREATE_FAILED. Poll with policy_get.

ParameterTypeDescription
definition *objectPolicyDefinition union. Specify exactly one key: "cedar" with {"statement": "<cedar policy text>"} for a raw Cedar statement (35-10000 chars), OR "policyGeneration" with {"policyGenerationId": "<id>",…
name *stringImmutable, unique policy name. Pattern: [A-Za-z][A-Za-z0-9_]*, max 48 chars.
policy_engine_id *stringParent policy engine ID (12-59 chars)
client_tokenIdempotency token (33-256 chars)
descriptionHuman-readable description (1-4096 chars)
validation_modeHow policy validation findings are handled. "FAIL_ON_ANY_FINDINGS" (default) rejects policies with validation findings. "IGNORE_ALL_FINDINGS" creates the policy regardless of findings.

policy_get

Get details of a Cedar policy. Returns the full policy including its Cedar definition, status, and timestamps. This is a read-only operation with no cost implications. Use to poll status after create/update/delete.

ParameterTypeDescription
policy_engine_id *stringParent policy engine ID
policy_id *stringPolicy ID (12-59 chars)

policy_update

Update a Cedar policy. COST WARNING: Updating a policy re-invokes the validation pipeline and consumes compute resources. This incurs AWS charges. Update is asynchronous — status transitions through UPDATING. Poll with policy_get.

ParameterTypeDescription
policy_engine_id *stringParent policy engine ID
policy_id *stringPolicy ID to update
definitionNew PolicyDefinition replacing the existing one. Union with one key: "cedar" ({"statement": "..."}) or "policyGeneration" ({"policyGenerationId": ..., "policyGenerationAssetId": ...}).
descriptionUpdatedDescription object with "optionalValue" key. Set {"optionalValue": "new text"} to update, {"optionalValue": null} to clear. Omit to leave unchanged.
validation_modeValidation mode for this update: "FAIL_ON_ANY_FINDINGS" or "IGNORE_ALL_FINDINGS".

policy_delete

Delete a Cedar policy. WARNING: This permanently deletes the policy. Delete is asynchronous — status transitions through DELETING. This action cannot be undone.

ParameterTypeDescription
policy_engine_id *stringParent policy engine ID
policy_id *stringPolicy ID to delete

policy_list

List Cedar policies within a Policy Engine. Returns policy summaries with IDs, ARNs, definitions, status, and timestamps. Optionally filter by target resource scope (e.g. a Gateway ARN). This is a read-only operation with no cost implications.

ParameterTypeDescription
policy_engine_id *stringParent policy engine ID
max_resultsMax results per page (1-100, default 10)
next_tokenPagination token
target_resource_scopeFilter policies by target resource scope (20-1011 chars). Typically a Gateway ARN.

policy_generation_start

Start an AI-powered Cedar policy generation from natural language. COST WARNING: Policy generation invokes foundation models and consumes significant compute resources. This is typically the most expensive Policy operation per call. Each invocation incurs AWS charges. The generation is asynchronous — starts in GENERATING and transitions to GENERATED or GENERATE_FAILED. Poll with policy_generation_get. Generated assets auto-delete after 7 days. To persist a generated policy, reference its asset in policy_create via the…

ParameterTypeDescription
content *objectContent union. Specify key "rawText" with a natural-language description (1-2000 chars) of the desired policy behavior. Example: {"rawText": "Allow users in group Admins to invoke the weather tool dur…
name *stringName for tracking this generation request. Pattern: [A-Za-z][A-Za-z0-9_]*, max 48 chars.
policy_engine_id *stringPolicy engine ID providing context for generation
resource *objectResource union identifying the target for this policy. Specify key "arn" with the resource ARN (20-1011 chars). Currently only Gateway ARNs are supported. Example: {"arn": "arn:aws:bedrock-agentcore:u…
client_tokenIdempotency token (33-256 chars)

policy_generation_get

Get details of an AgentCore Policy Generation. Returns the generation including status, findings, and resource context. Use to poll after policy_generation_start. This is a read-only operation with no cost implications.

ParameterTypeDescription
policy_engine_id *stringPolicy engine ID
policy_generation_id *stringPolicy generation ID (12-59 chars)

policy_generation_list

List policy generations within a Policy Engine. Returns policy generation summaries with IDs, ARNs, status, resource context, and timestamps. Generated assets auto-delete after 7 days. This is a read-only operation with no cost implications.

ParameterTypeDescription
policy_engine_id *stringPolicy engine ID
max_resultsMax results per page (1-100)
next_tokenPagination token

policy_generation_list_assets

List Cedar policies and findings produced by policy generation. Returns generated policy assets — each with its Cedar definition (if translatable), the original natural-language fragment, and validation findings (VALID, INVALID, NOT_TRANSLATABLE, ALLOW_ALL, ALLOW_NONE, DENY_ALL, DENY_NONE). Use assets with VALID findings in policy_create via the "policyGeneration" definition variant. This is a read-only operation with no cost implications.

ParameterTypeDescription
policy_engine_id *stringPolicy engine ID
policy_generation_id *stringPolicy generation ID
max_resultsMax results per page (1-100, default 10)
next_tokenPagination token

get_policy_guide

Get the comprehensive AgentCore Policy guide. Returns a detailed reference covering: CLI commands, agentcore.json schema, Cedar policy concepts, policy generation workflow, cost tiers, common patterns, troubleshooting, IAM permissions, and migration notes. This is a read-only operation with no cost implications.

start_browser_session

Start a cloud browser session via Amazon Bedrock AgentCore. Creates an isolated browser session running in a Firecracker microVM. Returns the session ID and automation stream URL for subsequent browser interaction tools. Usage: 1. Call this tool first to start a browser session. 2. Use the returned session_id with browser interaction tools (browser_navigate, browser_click, browser_snapshot, etc.). 3. Call stop_browser_session when done.

ParameterTypeDescription
browser_identifierstringAgentCore browser resource identifier. Use "aws.browser.v1" for the default browser.
extensionsList of browser extensions to load from S3 into the session.
profile_configurationProfile configuration for persisting cookies and local storage across sessions. Pass a profile identifier created via the AgentCore control plane.
proxy_configurationProxy configuration for routing browser traffic through external proxy servers. Supports multiple proxies with domain-based routing and bypass rules.
regionstringAWS region for AgentCore APIs
timeout_secondsintegerSession idle timeout in seconds — the session expires after this many seconds of inactivity (no tool calls). Default 900 (15 min), max 28800 (8 hours). Active sessions persist as long as there is in…
viewport_heightintegerBrowser viewport height in pixels
viewport_widthintegerBrowser viewport width in pixels

get_browser_session

Get the status and metadata of a browser session. Returns session status, stream endpoints, viewport dimensions, and creation timestamp.

ParameterTypeDescription
session_id *stringBrowser session identifier returned by start_browser_session
browser_identifierstringAgentCore browser resource identifier
regionstringAWS region for AgentCore APIs

stop_browser_session

Stop a browser session and release resources. Terminates the browser session and its underlying microVM. The session cannot be resumed after stopping.

ParameterTypeDescription
session_id *stringBrowser session identifier to terminate
browser_identifierstringAgentCore browser resource identifier
regionstringAWS region for AgentCore APIs

list_browser_sessions

List active browser sessions. Returns a summary of all browser sessions for the specified browser resource, including session IDs, status, and creation times.

ParameterTypeDescription
browser_identifierstringAgentCore browser resource identifier
max_resultsintegerMaximum number of sessions to return
regionstringAWS region for AgentCore APIs

browser_navigate

Navigate to a URL in the browser. Loads the specified URL and returns an accessibility tree snapshot of the loaded page, including pages that return non-2xx HTTP status codes (e.g., 404, 500). Use the element refs in the snapshot for subsequent interaction tools.

ParameterTypeDescription
session_id *stringBrowser session identifier
url *stringURL to navigate to

browser_navigate_back

Navigate back in browser history. Returns an accessibility tree snapshot of the previous page.

ParameterTypeDescription
session_id *stringBrowser session identifier

browser_navigate_forward

Navigate forward in browser history. Returns an accessibility tree snapshot of the next page.

ParameterTypeDescription
session_id *stringBrowser session identifier

browser_click

Click an element identified by its accessibility ref. Use refs from the most recent browser_snapshot or navigation result. If the ref is not found, returns an error with the current page snapshot so you can retry with a correct ref.

ParameterTypeDescription
ref *stringElement ref from snapshot (e.g., "e4")
session_id *stringBrowser session identifier
buttonstringMouse button: "left", "right", or "middle"
double_clickbooleanDouble-click instead of single click

browser_type

Type text into an element identified by its accessibility ref. By default, clears the existing content before typing. Set clear_first=False to append to existing text. Set submit=True to press Enter after typing.

ParameterTypeDescription
ref *stringElement ref from snapshot (e.g., "e2")
session_id *stringBrowser session identifier
text *stringText to type into the element
clear_firstbooleanClear existing content before typing
submitbooleanPress Enter after typing to submit

browser_fill_form

Fill multiple form fields in one action. Clears each field before filling. Optionally clicks a submit button after all fields are filled. Returns the page snapshot after completion.

ParameterTypeDescription
fields *arrayList of form fields to fill. Each entry has "ref" (element ref) and "value" (text to enter). Example: [{"ref": "e2", "value": "user@example.com"}]
session_id *stringBrowser session identifier
submit_refRef of the submit button to click after filling all fields

browser_select_option

Select an option from a dropdown or combobox. Provide one of: value (option value attribute), label (visible text), or index (zero-based position). Returns the page snapshot after selection.

ParameterTypeDescription
ref *stringElement ref of the select/combobox element
session_id *stringBrowser session identifier
indexZero-based index of the option to select
labelVisible text label of the option to select
valueOption value attribute to select

browser_hover

Hover over an element identified by its accessibility ref. Useful for triggering tooltips, dropdown menus, or hover states. Returns the page snapshot after hovering.

ParameterTypeDescription
ref *stringElement ref to hover over
session_id *stringBrowser session identifier

browser_press_key

Press a keyboard key or key combination. Simulates a key press on the page (not a specific element). Supports modifier combinations like "Control+a" or "Meta+c". Returns the page snapshot after the key press.

ParameterTypeDescription
key *stringKey to press. Examples: "Enter", "Tab", "Escape", "ArrowDown", "Control+a", "Meta+c". See Playwright keyboard API for key names.
session_id *stringBrowser session identifier

browser_upload_file

Upload files to a file input element identified by its ref. Resolves the ref to a file input locator and sets the specified file paths. For cloud AgentCore sessions, paths refer to files on the remote VM. For local Playwright connections, paths refer to files on the local filesystem.

ParameterTypeDescription
paths *arrayList of file paths to upload
ref *stringElement ref of the file input (e.g., "e5")
session_id *stringBrowser session identifier

browser_handle_dialog

Configure how JavaScript dialogs are handled for a session. Sets a persistent handler for JavaScript dialogs (alert, confirm, prompt, beforeunload). Once set, all subsequent dialogs in the session are automatically accepted or dismissed. Call again to change the behavior.

ParameterTypeDescription
session_id *stringBrowser session identifier
actionstringHow to handle dialogs: "accept" or "dismiss"
prompt_textText to enter for prompt dialogs (only used with accept)

browser_mouse_wheel

Scroll the page by the specified pixel amounts. Default scrolls down by 500px (roughly half a viewport). Use negative delta_y to scroll up. Returns the page snapshot after scrolling.

ParameterTypeDescription
session_id *stringBrowser session identifier
delta_xintegerHorizontal scroll amount in pixels (positive = right)
delta_yintegerVertical scroll amount in pixels (positive = down, negative = up)

browser_snapshot

Capture an accessibility tree snapshot of the current page. Returns a structured text view of the page with element refs. Use the refs (e.g., e1, e2) in interaction tools like browser_click and browser_type to target specific elements. Example output: - heading "Sign In" [ref=e1] - textbox "Email" [ref=e2] - textbox "Password" [ref=e3] - button "Sign In" [ref=e4]

ParameterTypeDescription
session_id *stringBrowser session identifier
selectorOptional CSS selector to scope the snapshot to a specific section of the page (e.g., "main", "[role=main]", "#content"). If omitted, captures the full page.

browser_take_screenshot

Capture a visual screenshot of the page. Returns the screenshot as a base64-encoded PNG image. Use this when you need to visually inspect the page rather than reading the accessibility tree.

ParameterTypeDescription
session_id *stringBrowser session identifier
full_pagebooleanCapture the full scrollable page instead of just the viewport

browser_wait_for

Wait for text to appear or an element to become visible. Provide either text or selector. Returns the page snapshot after the condition is met. Raises an error if the timeout is exceeded.

ParameterTypeDescription
session_id *stringBrowser session identifier
selectorCSS selector to wait for
textWait for this text to appear on the page
timeoutintegerMaximum wait time in milliseconds (default: 10000)

browser_console_messages

Get recent browser console messages. Returns console log, warning, and error messages captured since the Playwright connection was established. Useful for debugging JavaScript errors or inspecting application logging.

ParameterTypeDescription
session_id *stringBrowser session identifier

browser_network_requests

List recent network requests and their status. Returns a summary of network requests made by the page, including URL, HTTP method, status code, and resource type. Useful for debugging API calls or monitoring page loading.

ParameterTypeDescription
session_id *stringBrowser session identifier

browser_evaluate

Execute a JavaScript expression in the page context. The expression is evaluated in the browser and its return value is serialized to JSON. Use this for extracting data, reading page state, or performing custom interactions. You can use fetch() to make HTTP requests from the browser's origin and cookies.

ParameterTypeDescription
expression *stringJavaScript expression to evaluate in the page context. Use for inspecting state, extracting data, or performing actions not covered by other tools.
session_id *stringBrowser session identifier

browser_tabs

Manage browser tabs: list, create, select, or close tabs. Actions: - "list": Show all open tabs with their titles and URLs. - "new": Open a new tab, optionally navigating to a URL. - "select": Switch the active tab (subsequent tools use this tab). - "close": Close a tab by its index.

ParameterTypeDescription
session_id *stringBrowser session identifier
actionstringTab action to perform: "list" to show all tabs, "new" to open a new tab, "select" to switch to a tab by index, "close" to close a tab by index.
tab_indexZero-based tab index for "select" and "close" actions
urlURL to open in a new tab (for "new" action)

browser_close

Close the current page. Closes the active page in the browser session. If multiple tabs are open, subsequent tools will use the remaining tab. Use stop_browser_session to fully terminate the session.

ParameterTypeDescription
session_id *stringBrowser session identifier

browser_resize

Resize the browser viewport. Changes the viewport dimensions of the active page. Useful for testing responsive layouts or viewing content at different sizes. Returns the page snapshot at the new size.

ParameterTypeDescription
height *integerNew viewport height in pixels
session_id *stringBrowser session identifier
width *integerNew viewport width in pixels

start_code_interpreter_session

Start a new sandboxed code interpreter session. Creates a new session that can execute code, run commands, and manage files in an isolated environment. The session remains active until explicitly stopped or until the timeout expires (default DEFAULT_SESSION_TIMEOUT_SECONDS). Args: ctx: MCP context for error signaling and progress updates. code_interpreter_identifier: Code interpreter to use. Defaults to CODE_INTERPRETER_IDENTIFIER env var or 'aws.codeinterpreter.v1'. name: Optional human-readable name for the session. session_timeou…

ParameterTypeDescription
code_interpreter_identifier
name
region
session_timeout_seconds

stop_code_interpreter_session

Stop a running code interpreter session and release its resources. Args: ctx: MCP context for error signaling and progress updates. session_id: The session ID to stop. code_interpreter_identifier: Code interpreter identifier. Defaults to CODE_INTERPRETER_IDENTIFIER env var or 'aws.codeinterpreter.v1'. region: AWS region. Defaults to AWS_REGION env var or 'us-east-1'. Returns: CodeInterpreterSessionResponse with session_id, status, and message.

ParameterTypeDescription
session_id *string
code_interpreter_identifier
region

get_code_interpreter_session

Get the status and details of a code interpreter session. Args: ctx: MCP context for error signaling and progress updates. session_id: The session ID to query. code_interpreter_identifier: Code interpreter identifier. Defaults to CODE_INTERPRETER_IDENTIFIER env var or 'aws.codeinterpreter.v1'. region: AWS region. Defaults to AWS_REGION env var or 'us-east-1'. Returns: CodeInterpreterSessionResponse with session_id, status, and message.

ParameterTypeDescription
session_id *string
code_interpreter_identifier
region

list_code_interpreter_sessions

List code interpreter sessions with optional filtering. Args: ctx: MCP context for error signaling and progress updates. code_interpreter_identifier: Code interpreter identifier. Defaults to CODE_INTERPRETER_IDENTIFIER env var or 'aws.codeinterpreter.v1'. status: Filter by session status ('READY' or 'TERMINATED'). max_results: Maximum number of sessions to return (1-100). next_token: Pagination token from a previous response. region: AWS region. Defaults to AWS_REGION env var or 'us-east-1'. Returns: SessionListRespo…

ParameterTypeDescription
code_interpreter_identifier
max_results
next_token
region
status

execute_code

Execute code in a sandboxed code interpreter session. Runs Python, JavaScript, or TypeScript code in the session's sandbox. The execution context (variables, imports) persists across calls within the same session unless clear_context is True. Args: ctx: MCP context for error signaling and progress updates. session_id: The session ID to execute code in. Must be a started session. code: The source code to execute. language: Programming language ('python', 'javascript', 'typescript'). Defaults to 'python'. clear_context: If Tru…

ParameterTypeDescription
code *string
session_id *string
clear_context
language
region

execute_command

Execute a shell command in a sandboxed code interpreter session. Runs a shell command in the session's sandbox environment. Args: ctx: MCP context for error signaling and progress updates. session_id: The session ID to execute the command in. command: The shell command to execute. region: AWS region. Returns: ExecutionResult with stdout, stderr, exit_code, is_error, and message.

ParameterTypeDescription
command *string
session_id *string
region

install_packages

Install Python packages in a sandboxed code interpreter session. Uses pip to install the specified packages in the session's sandbox. Args: ctx: MCP context for error signaling and progress updates. session_id: The session ID to install packages in. packages: List of package names to install (e.g. ['numpy', 'pandas>=2.0']). upgrade: If True, upgrade packages to the latest version. region: AWS region. Returns: ExecutionResult with stdout, stderr, exit_code, is_error, and message.

ParameterTypeDescription
packages *array
session_id *string
region
upgradeboolean

upload_file

Upload a file to the sandboxed code interpreter session. Creates or overwrites a file at the specified path in the session's sandbox with the given content. Path must be relative (e.g. 'data/input.csv'). The SDK raises ValueError for absolute paths. For binary files, pass the content as a base64-encoded string. The sandbox can then decode it, e.g. via ``import base64; data = base64.b64decode(content)``. Args: ctx: MCP context for error signaling and progress updates. session_id: The session ID to upload the file to. path: Relative file path in…

ParameterTypeDescription
content *string
path *string
session_id *string
description
region

download_file

Download a file from the sandboxed code interpreter session. Reads the content of a file at the specified path in the session's sandbox. Args: ctx: MCP context for error signaling and progress updates. session_id: The session ID to download the file from. path: Relative file path in the sandbox to download (e.g. 'output/result.csv'). region: AWS region. Returns: FileOperationResult with path, content, and message.

ParameterTypeDescription
path *string
session_id *string
region

list_files

List files in the sandboxed code interpreter session. Lists files and directories at the specified path in the session's sandbox. If no directory_path is provided, lists files from the default working directory. Args: ctx: MCP context for error signaling and progress updates. session_id: The session ID to list files in. Must be a started session. directory_path: Optional directory path to list. Lists from the default working directory if omitted. region: AWS region. Returns: FileListResult with file paths, raw content text,…

ParameterTypeDescription
session_id *string
directory_path
region