Skip to main content
Glama

Attach to Docker Container

intercept_docker_container

Intercept and inspect HTTP(S) traffic from Docker containers by injecting proxy settings to capture all outgoing web traffic for debugging purposes.

Instructions

Intercept all HTTP(S) traffic from a running Docker container. Injects proxy settings into the container to capture all outgoing HTTP traffic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyPortYesProxy port to route traffic through
containerIdYesDocker container ID to attach to. Use get_interceptor_metadata with id "docker-attach" to list available containers.

Implementation Reference

  • src/index.ts:192-204 (registration)
    Tool registration and handler definition for 'intercept_docker_container', which uses the 'client.activateInterceptor' helper to attach to a docker container.
    server.registerTool(
      'intercept_docker_container',
      {
        title: 'Attach to Docker Container',
        description: 'Intercept all HTTP(S) traffic from a running Docker container. Injects proxy settings into the container to capture all outgoing HTTP traffic.',
        inputSchema: z.object({
          proxyPort: z.number().describe('Proxy port to route traffic through'),
          containerId: z.string().describe('Docker container ID to attach to. Use get_interceptor_metadata with id "docker-attach" to list available containers.'),
        }),
      },
      async ({ proxyPort, containerId }) =>
        jsonResult(await client.activateInterceptor('docker-attach', proxyPort, { containerId }))
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions injection of proxy settings but lacks critical details: whether this requires elevated permissions, if it affects container performance, if changes are reversible, what happens to existing traffic, or potential side effects. The description is insufficient for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste—front-loaded with the core purpose and followed by implementation detail. Every word earns its place, making it highly efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on prerequisites (e.g., Docker daemon access), behavioral impact (e.g., traffic disruption), error conditions, or what the tool returns. Given the complexity of intercepting container traffic, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters. The description adds no additional meaning beyond what the schema provides (e.g., it doesn't explain proxyPort usage in context or containerId format). Baseline 3 is appropriate when the schema handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('intercept all HTTP(S) traffic'), target resource ('running Docker container'), and mechanism ('injects proxy settings'). It distinguishes from siblings like 'intercept_android_adb' or 'intercept_chrome' by specifying Docker containers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives is provided. While it mentions using 'get_interceptor_metadata' to list containers, it doesn't clarify when to choose this over other intercept tools (e.g., 'intercept_existing_terminal') or how it relates to sibling tools like 'activate_interceptor' or 'capture_traffic'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fdciabdul/httptoolkit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server