Skip to main content
Glama

Mid-Session MCP tools/list Rug-Pull & Schema Mutation Detector

detect_mcp_schema_rugpull
Read-onlyIdempotent

Compares a pinned baseline tools/list snapshot against a live MCP server response to detect mid-session schema or description tampering.

Instructions

Computes structural diffs between a pinned baseline MCP tools/list snapshot and a live server response to catch mid-session description or schema tampering. Use when verifying that a connected MCP server has not mutated its tool definitions mid-session; for performing a first-time static security audit on a single MCP manifest, use audit_mcp_server_manifest instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'baseline_tools_json' ('current_tools_json' defaults to 'standard'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
diff_modeNoComparison strictness across descriptions and inputSchema; defaults to 'full_structural' when omitted.
current_tools_jsonNoJSON-serialized live tools/list array to compare against the baseline; defaults to '[]' when omitted.
baseline_tools_jsonYesJSON-serialized baseline tools/list array captured when the MCP server was first trusted.

Output Schema

NameRequiredDescriptionDefault
verdictYesConnection verdict ('SCHEMA_INTEGRITY_VERIFIED' or 'REVOKE_MCP_SERVER_IMMEDIATELY').
mutated_toolsYesDetailed list of modified tools and their exact mutation type.
timestamp_utcYesISO-8601 UTC timestamp of the diff audit.
rugpull_detectedYesTrue if any tool was surreptitiously added or had its description/schema altered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.3

TDQS

A4.8/5.0
Behavior5/5

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

The description provides critical behavioral traits beyond the annotations, including resource limitations (32 KB, 60 RPM), operational mode (Stateless read-only edge call), and specific failure modes (HTTP 400 if invalid). This level of detail is essential for an agent operating in a system integrity context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is dense and highly technical, which is appropriate for its subject matter. While long, every phrase serves a functional purpose, successfully front-loading the primary goal and scoping constraints within the initial sentences.

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?

Given its high complexity and focus on security, the description is nearly exhaustive. It covers input requirements, operational limits, error handling, use cases, and explicit differentiation from related tools, leaving no critical operational gaps.

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?

Although the schema coverage is 100%, the description adds significant semantic context. It clarifies the functional role of the inputs (baseline is the trusted past, live is the current measurement) and details advanced invocation parameters like the use of 'demo=true' and specific payment units (L402).

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 purpose is highly specific: it computes structural differences between a pinned baseline and a live response. It clearly states the outcome—catching mid-session description or schema tampering—which is distinct from general auditing functions like `audit_mcp_server_manifest`.

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?

The usage guidelines are explicitly defined by the operational context. It identifies the primary use case (mid-session verification) and provides a direct alternative sibling tool for a related but different use case (first-time static security audit).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools