Skip to main content
Glama

native_messaging_audit

Read-only

Audit local native messaging hosts and AI browser bridges. Detect missing binaries, pre-authorized extensions, and invalid manifests to prevent insecure agent actions.

Instructions

Audit local browser native messaging hosts and AI browser bridges. Flags missing host binaries, pre-authorized extension bridges, and manifests for browsers not detected locally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformNoOptional platform override for manifest discovery.
homeDirNoOptional home-directory override for manifest discovery.
aiOnlyNoWhen true, only AI/browser bridge manifests are returned.

Implementation Reference

  • Main handler function 'buildNativeMessagingAudit' that collects native messaging host manifests, analyzes them for security findings, and returns a structured audit report. Called by the MCP server for the 'native_messaging_audit' tool.
    function buildNativeMessagingAudit(options = {}) {
      const collected = collectNativeMessagingEntries(options);
      const findings = summarizeFindings(collected.entries);
      const highSeverityCount = findings.filter((finding) => finding.severity === 'high').length;
      const mediumSeverityCount = findings.filter((finding) => finding.severity === 'medium').length;
      const browsersCovered = [...new Set(collected.entries.map((entry) => entry.browser))];
      const aiBridgeCount = collected.entries.filter((entry) => entry.aiBridge).length;
    
      let status = 'clear';
      if (highSeverityCount > 0) {
        status = 'review';
      } else if (mediumSeverityCount > 0) {
        status = 'watch';
      }
    
      return {
        name: 'thumbgate-native-messaging-audit',
        generatedAt: new Date().toISOString(),
        platform: collected.platform,
        homeDir: collected.homeDir,
        status,
        summary: {
          manifestCount: collected.entries.length,
          browsersCovered: browsersCovered.length,
          aiBridgeCount,
          highSeverityCount,
          mediumSeverityCount,
        },
        notes: collected.notes,
        manifests: collected.entries,
        findings,
        recommendations: buildRecommendations(findings, options),
      };
    }
  • MCP tool registration/switch case that maps the 'native_messaging_audit' tool name to the buildNativeMessagingAudit function, passing platform, homeDir, and aiOnly arguments.
    case 'native_messaging_audit':
      return toTextResult(buildNativeMessagingAudit({
        platform: args.platform,
        homeDir: args.homeDir,
        aiOnly: args.aiOnly === true,
      }));
  • CLI schema definition for 'native-messaging-audit' command (alias 'bridge-audit'), mapping it to MCP tool 'native_messaging_audit' with flags for platform, home-dir, ai-only, and json.
    discoveryCommand({
      name: 'native-messaging-audit',
      aliases: ['bridge-audit'],
      description: 'Audit local browser native messaging hosts and AI browser bridges',
      mcpTool: 'native_messaging_audit',
      flags: [
        jsonFlag(),
        { name: 'platform', type: 'string', description: 'Override platform detection (darwin | linux | win32)' },
        { name: 'home-dir', type: 'string', description: 'Override home directory for manifest discovery' },
        { name: 'ai-only', type: 'boolean', description: 'Only report AI/browser bridge manifests' },
      ],
    }),
  • Import of the buildNativeMessagingAudit function from the scripts module into the MCP server.
    const { buildNativeMessagingAudit } = require('../../scripts/native-messaging-audit');
  • Module exports exposing buildNativeMessagingAudit, collectNativeMessagingEntries, formatNativeMessagingAudit, and other helper utilities used by the tool.
    module.exports = {
      AI_VENDOR_PATTERNS,
      BROWSER_TARGETS,
      buildNativeMessagingAudit,
      collectNativeMessagingEntries,
      formatNativeMessagingAudit,
      getBrowserTargets,
      guessVendor,
      normalizePlatform,
    };
Behavior4/5

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

Annotations already state readOnlyHint=true. The description adds value by disclosing what the audit flags (missing host binaries, pre-authorized bridges, manifests for undetected browsers), providing behavioral context beyond the annotation.

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?

The description consists of two concise sentences with no redundant information. Every sentence contributes meaningfully to understanding the tool.

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

Completeness4/5

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

Given the tool's complexity and lack of output schema, the description adequately explains what the tool flags and its read-only nature. It could be improved by specifying the output format, but it is sufficiently complete for an agent to understand its behavior.

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% with clear parameter descriptions. The tool description does not add additional semantic value beyond what the schema already provides, so a baseline score of 3 is appropriate.

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 uses specific verb 'audit' and clearly identifies the resource ('local browser native messaging hosts and AI browser bridges'). It also distinguishes the tool's function from siblings by detailing what it flags (missing binaries, pre-authorized bridges, undetected manifests).

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 clearly implies usage for auditing native messaging installations and flags specific issues. However, it does not explicitly state when to use this tool versus alternatives or provide exclusions.

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/IgorGanapolsky/ThumbGate'

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