Skip to main content
Glama

Intercept Existing Terminal

intercept_existing_terminal

Generate shell commands to intercept HTTP(S) traffic from processes launched in an existing terminal by routing through a specified proxy port.

Instructions

Get a command to run in an existing terminal to start intercepting HTTP(S) traffic from processes launched in that terminal. Returns shell-specific commands for bash, zsh, fish, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyPortYesProxy port to route traffic through

Implementation Reference

  • Tool registration and handler definition for 'intercept_existing_terminal', which uses the client to activate the interceptor.
    server.registerTool(
      'intercept_existing_terminal',
      {
        title: 'Intercept Existing Terminal',
        description: 'Get a command to run in an existing terminal to start intercepting HTTP(S) traffic from processes launched in that terminal. Returns shell-specific commands for bash, zsh, fish, etc.',
        inputSchema: z.object({
          proxyPort: z.number().describe('Proxy port to route traffic through'),
        }),
      },
      async ({ proxyPort }) => jsonResult(await client.activateInterceptor('existing-terminal', proxyPort))
    );
  • The underlying HttpToolkitClient implementation for activating an interceptor.
    async activateInterceptor(
      id: string,
      proxyPort: number,
      options?: unknown
    ): Promise<{ result: { success: boolean; metadata?: unknown } }> {
      return this.request(
        'POST',
        `/interceptors/${encodeURIComponent(id)}/activate/${proxyPort}`,
        options || {}
      );
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks critical behavioral details. It doesn't disclose whether this is a read-only or destructive operation, what permissions are needed, whether it affects terminal functionality, or any rate limits. The description mentions it 'returns shell-specific commands' but doesn't explain what happens after running those commands or potential side effects.

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. First sentence states purpose and scope, second sentence specifies output format. Every word earns its place, and key information is front-loaded.

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

Completeness3/5

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

For a tool with 1 parameter (100% schema coverage) but no annotations and no output schema, the description is minimally adequate. It explains what the tool does and what it returns, but lacks important behavioral context about safety, side effects, and what happens after command execution. The absence of output schema means the description should ideally explain return values more thoroughly.

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% (parameter 'proxyPort' is fully described in schema), so baseline is 3. The description doesn't add any parameter-specific information beyond what the schema provides about 'proxyPort', nor does it explain relationships between parameters and the returned commands.

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 ('Get a command to run'), target resource ('existing terminal'), and purpose ('start intercepting HTTP(S) traffic from processes launched in that terminal'). It distinguishes from sibling tools like 'intercept_fresh_terminal' by specifying 'existing terminal' and from 'capture_traffic' by focusing on setup rather than ongoing capture.

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

Usage Guidelines4/5

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

The description implies usage context: when you have an existing terminal and want to intercept traffic from processes launched there. It doesn't explicitly state when NOT to use it or name alternatives, but the context is clear enough to differentiate from tools like 'intercept_fresh_terminal' (for new terminals) or 'intercept_chrome' (for specific applications).

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