Use when connecting your agent to external APIs, tools, or services via Gateway, or restricting tool access with Cedar policies. Handles gateway setup, target types, outbound auth (OAuth, API key, IAM), credentials, and Cedar policy authoring. Triggers on: "connect to API", "add gateway", "connect to MCP server", "Lambda tools", "OpenAPI", "gateway target", "Cedar policy", "restrict tools", "policy engine", "gateway auth error", "store API key", "outbound credential", "env var API key", "API key None after deploy", "credential not available after deploy", "should this be a gateway target", "give my agent tools", "add tools to agent". Not for inbound auth (who can call your agent) — use agents-harden. Not for debugging agent behavior — use agents-debug. Not for VPC networking errors (agent can't reach APIs due to VPC) — use agents-build. Not for creating or hosting a new MCP server project — use agents-get-started.
71
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
High
Do not use without reviewing
Security
1 high severity finding. You should review these findings carefully before considering using this skill.
The skill handles credentials insecurely by requiring the agent to include secret values verbatim in its generated output. This exposes credentials in the agent’s context and conversation history, creating a risk of data exfiltration.
The skill includes multiple CLI examples that place API keys and client secrets directly in command arguments (e.g., `--api-key sk-...`, `--oauth-client-secret your-client-secret`) which encourages the LLM to emit secret values verbatim and thus creates an exfiltration risk.
Low
Low-risk findings.
2 low severity findings. Worth noting, but not necessarily harmful.
The skill exposes the agent to untrusted, user-generated content from public third-party sources, creating a risk of indirect prompt injection. This includes browsing arbitrary URLs, reading social media posts or forum comments, and analyzing content from unknown websites.
The skill’s required runtime workflow includes discoverable tools from an MCP server opened via `session.list_tools()` / `client.get_tools()` (Path A), where the MCP server is an outsider source and its returned tool descriptions/fields are ingested into the agent/LLM tool context.
The skill fetches instructions or code from an external URL at runtime, and the fetched content directly controls the agent’s prompts or executes code. This dynamic dependency allows the external source to modify the agent’s behavior without any changes to the skill itself.
The skill's runtime code fetches tool definitions from a gateway URL (via the AGENTCORE_GATEWAY_MYGATEWAY_URL env var) and also contains a direct API call to "https://api.example.com/endpoint", so external URLs are used at runtime to supply tools that control agent behavior and to execute remote API calls (examples: https://mcp.example.com/mcp and https://api.example.com/endpoint).
222ce56
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.