Skip to main content
Glama

proxy_get_ca_cert

Retrieve the CA certificate PEM and SPKI fingerprint to install on a target device for HTTPS interception.

Instructions

Get the CA certificate PEM and SPKI fingerprint for installing on the target device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoWhat to return: 'pem', 'fingerprint', or 'both'both

Implementation Reference

  • The tool handler for 'proxy_get_ca_cert'. It receives a 'format' parameter (pem, fingerprint, or both), retrieves the CA certificate from proxyManager.getCert(), and returns the PEM, fingerprint, or both along with installation instructions.
    server.tool(
      "proxy_get_ca_cert",
      "Get the CA certificate PEM and SPKI fingerprint for installing on the target device.",
      {
        format: z.enum(["pem", "fingerprint", "both"]).optional().default("both")
          .describe("What to return: 'pem', 'fingerprint', or 'both'"),
      },
      async ({ format }) => {
        const cert = proxyManager.getCert();
        if (!cert) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: "No certificate. Start the proxy first." }) }] };
        }
    
        const result: Record<string, unknown> = { status: "success" };
        if (format === "pem" || format === "both") {
          result.certPem = cert.cert;
        }
        if (format === "fingerprint" || format === "both") {
          result.fingerprint = cert.fingerprint;
        }
        result.instructions = "Save the PEM to a .crt file, transfer to device, and install as trusted CA.";
    
        return { content: [{ type: "text", text: JSON.stringify(result) }] };
      },
    );
  • Input schema for proxy_get_ca_cert: accepts an optional 'format' parameter (z.enum(['pem', 'fingerprint', 'both']) with default 'both').
    {
      format: z.enum(["pem", "fingerprint", "both"]).optional().default("both")
        .describe("What to return: 'pem', 'fingerprint', or 'both'"),
  • Tool registered via server.tool() call inside registerLifecycleTools(). The tool is named 'proxy_get_ca_cert' and registered as part of the lifecycle tools module.
    server.tool(
      "proxy_get_ca_cert",
      "Get the CA certificate PEM and SPKI fingerprint for installing on the target device.",
      {
        format: z.enum(["pem", "fingerprint", "both"]).optional().default("both")
          .describe("What to return: 'pem', 'fingerprint', or 'both'"),
      },
      async ({ format }) => {
        const cert = proxyManager.getCert();
        if (!cert) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: "No certificate. Start the proxy first." }) }] };
        }
    
        const result: Record<string, unknown> = { status: "success" };
        if (format === "pem" || format === "both") {
          result.certPem = cert.cert;
        }
        if (format === "fingerprint" || format === "both") {
          result.fingerprint = cert.fingerprint;
        }
        result.instructions = "Save the PEM to a .crt file, transfer to device, and install as trusted CA.";
    
        return { content: [{ type: "text", text: JSON.stringify(result) }] };
      },
    );
  • Helper method proxyManager.getCert() returns the CertificateInfo (key, cert PEM, fingerprint) that the tool handler calls to retrieve the CA certificate data. The cert is generated in ProxyManager.start() using mockttp.generateCACertificate().
    getCert(): CertificateInfo | null {
      return this.cert;
    }
  • CA certificate generation and storage in ProxyManager.start(). Uses mockttp to generate a 2048-bit CA cert and SPKI fingerprint, stored in this.cert.
    // Generate CA cert (once, reused across rebuilds)
    if (!this.cert) {
      const mockttp = await getMockttp();
      const ca = await mockttp.generateCACertificate({ bits: 2048 });
      const fingerprint = mockttp.generateSPKIFingerprint(ca.cert);
      this.cert = { key: ca.key, cert: ca.cert, fingerprint };
    }
Behavior3/5

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

No annotations provided, so description carries full burden. It describes a read operation ('Get'), which is transparent. But no mention of permissions, side effects, or error conditions, leaving some gaps.

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?

Single sentence, no redundant words, front-loaded with action and resource. Perfectly concise.

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

Completeness5/5

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

For a simple one-parameter getter with no output schema, the description is complete: it tells what, why, and the format options are clear from schema. Siblings indicate it fits into proxy setup workflow.

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 covers format parameter 100% with enum and default. Description does not add extra meaning beyond 'PEM and SPKI fingerprint'. Baseline 3 applies due to high schema coverage.

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 verb 'get' and the resource 'CA certificate PEM and SPKI fingerprint', with clear purpose 'for installing on the target device'. This distinguishes it from sibling tools like proxy_set_* or proxy_start.

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 phrase 'for installing on the target device' provides usage context, indicating this is a setup step. However, no explicit guidance on when to use vs alternatives (e.g., proxy_check_fingerprint_runtime) is given.

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/yfe404/proxy-mcp'

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