Skip to main content
Glama

pilot_set_header

Configure custom HTTP headers for web requests, with sensitive values automatically redacted in responses to maintain security.

Instructions

Set a custom request header. Sensitive values are auto-redacted in the response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesHeader name
valueYesHeader value

Implementation Reference

  • The 'pilot_set_header' tool is registered and implemented within 'registerSettingsTools'. It sets a custom header on the browser context via 'bm.setExtraHeader' and includes basic redaction for sensitive headers in the response.
    server.tool(
      'pilot_set_header',
      'Set a custom request header. Sensitive values are auto-redacted in the response.',
      {
        name: z.string().describe('Header name'),
        value: z.string().describe('Header value'),
      },
      async ({ name, value }) => {
        await bm.ensureBrowser();
        try {
          await bm.setExtraHeader(name, value);
          const sensitiveHeaders = ['authorization', 'cookie', 'set-cookie', 'x-api-key', 'x-auth-token'];
          const redactedValue = sensitiveHeaders.includes(name.toLowerCase()) ? '****' : value;
          return { content: [{ type: 'text' as const, text: `Header set: ${name}: ${redactedValue}` }] };
        } catch (err) {
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses the 'auto-redacted' security behavior for sensitive values, which is valuable. However, it omits scope (persistent vs single-request), overwrite behavior, and side effects on existing headers.

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 tightly constructed sentences. First states the action, second adds critical safety information. No filler or redundancy—every word earns its place.

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?

Adequate for a 2-parameter tool with complete schema coverage. Missing scope/lifecycle details (session persistence) and no output schema explanation, but sufficient for basic usage given the tool's simplicity.

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 has 100% coverage with 'Header name' and 'Header value' descriptions. Description adds context that these parameters constitute a 'custom request header' (HTTP context), but doesn't elaborate on format constraints or examples beyond the schema.

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

Purpose4/5

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

Clear verb 'Set' and resource 'request header'. Identifies the action precisely, though it doesn't explicitly differentiate from sibling 'pilot_set_useragent' which technically sets a specific header type.

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 guidance provided on when to use this vs. 'pilot_set_useragent', when headers should be set (pre-navigation vs post), or prerequisites like needing to set headers before making requests.

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/TacosyHorchata/Pilot'

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