Skip to main content
Glama

bridge_status

Determine if the bridge is up to date by comparing its version with the latest on npm. Returns upgrade steps when an update is available.

Instructions

Report the bridge's own version and check whether a newer one is on npm. Returns {bridge_version, bridge_latest, update_available, upgrade_steps}. Call this when the user asks 'is mockzilla-mcp up to date?', or proactively if a tool starts failing in a way that could be a stale-bridge issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The bridgeStatus function that executes the tool logic. Reads the current version from package.json, checks npm registry for the latest version, compares them with semver, and returns version info plus upgrade steps if an update is available.
    export async function bridgeStatus() {
      const current = await bridgeVersion();
      const latest = await latestPublishedVersion();
      const updateAvailable =
        latest != null && compareSemver(latest, current) > 0;
    
      return {
        bridge_version: current,
        bridge_latest: latest,
        update_available: updateAvailable,
        upgrade_steps: updateAvailable
          ? [
              "Run: npx clear-npx-cache @mockzilla/mcp",
              "Quit and reopen your MCP client (Claude Desktop / Cursor).",
              "If your config uses '@mockzilla/mcp@latest', the new version is fetched on the next launch automatically.",
            ]
          : null,
      };
    }
  • Registration of the 'bridge_status' tool with its description (telling the agent when to call it) and inputSchema (empty object, no params needed).
    bridge_status: {
      description:
        "Report the bridge's own version and check whether a newer one " +
        "is on npm. Returns {bridge_version, bridge_latest, update_available, " +
        "upgrade_steps}. Call this when the user asks 'is mockzilla-mcp up " +
        "to date?', or proactively if a tool starts failing in a way that " +
        "could be a stale-bridge issue.",
      inputSchema: {
        type: "object",
        properties: {},
        additionalProperties: false,
      },
      handler: bridgeStatus,
    },
  • lib/tools.js:312-325 (registration)
    The tool definition in the LOCAL_TOOLS registry, mapping the name 'bridge_status' to its description, input schema, and handler.
    bridge_status: {
      description:
        "Report the bridge's own version and check whether a newer one " +
        "is on npm. Returns {bridge_version, bridge_latest, update_available, " +
        "upgrade_steps}. Call this when the user asks 'is mockzilla-mcp up " +
        "to date?', or proactively if a tool starts failing in a way that " +
        "could be a stale-bridge issue.",
      inputSchema: {
        type: "object",
        properties: {},
        additionalProperties: false,
      },
      handler: bridgeStatus,
    },
  • Helper that reads and caches the current bridge version from package.json.
    export async function bridgeVersion() {
      if (cachedVersion) return cachedVersion;
      const raw = await readFile(PKG_PATH, "utf8");
      const pkg = JSON.parse(raw);
      cachedVersion = pkg.version;
      return cachedVersion;
    }
  • Helper that fetches the latest published version from the npm registry with caching and a 4-second timeout.
    export async function latestPublishedVersion() {
      if (cachedLatest && Date.now() - cachedAt < LATEST_CACHE_TTL_MS) {
        return cachedLatest;
      }
      const ctrl = new AbortController();
      const t = setTimeout(() => ctrl.abort(), 4000);
      try {
        const res = await fetch(
          "https://registry.npmjs.org/@mockzilla/mcp/latest",
          { signal: ctrl.signal },
        );
        if (!res.ok) return null;
        const body = await res.json();
        cachedLatest = body.version || null;
        cachedAt = Date.now();
        return cachedLatest;
      } catch {
        return null;
      } finally {
        clearTimeout(t);
      }
    }
Behavior4/5

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

Returns specific fields and is read-only. No annotations, but the description explains output and usage. Could mention external call but not required.

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, efficient: first states purpose and output, second gives usage guidance. No redundancy.

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?

Complete for a simple status tool: describes action, return fields, and when to use. No output schema but description covers it.

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

Parameters4/5

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

No parameters; schema coverage 100%. Description adds meaning by specifying return fields and usage, meeting baseline for 0 parameters.

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?

Clearly states it reports bridge version and checks for updates on npm. Names the return fields and describes the action with specific verb and resource.

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

Usage Guidelines5/5

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

Explicitly says to call when user asks if updates exist or proactively when tools fail due to stale bridge. Provides clear context.

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/mockzilla/mockzilla-mcp'

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