Skip to main content
Glama
badchars

mcp-security-scanner

by badchars

rt_check_cross_origin

Scans MCP tool descriptions for cross-origin references, detecting tool shadowing attack patterns such as 'use the email tool' from other servers.

Instructions

Scan tool descriptions for references to tools from OTHER servers — patterns like 'when using the email tool', 'before calling read_file'. These cross-origin instructions enable tool shadowing attacks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoAdditional environment variables for stdio
urlNoMCP server URL for HTTP/SSE transport (e.g. 'http://localhost:3000/mcp')
argsNoCommand arguments for stdio (e.g. ['run', 'server.js'])
commandNoServer command for stdio transport (e.g. 'node', 'bun', 'npx')
headersNoCustom HTTP headers (e.g. { 'Authorization': 'Bearer token' })
timeout_msNoConnection timeout in milliseconds (default: 30000)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv1.1.1
    • changedInput schema / properties / args / description
      Previous value: -"Command arguments (e.g. ['run', 'server.js'])"New value: +"Command arguments for stdio (e.g. ['run', 'server.js'])"
    • changedInput schema / properties / command / description
      Previous value: -"Server command to execute (e.g. 'node', 'bun', 'npx')"New value: +"Server command for stdio transport (e.g. 'node', 'bun', 'npx')"
    • changedInput schema / properties / env / description
      Previous value: -"Additional environment variables"New value: +"Additional environment variables for stdio"
    • addedInput schema / properties / headers
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Custom HTTP headers (e.g. { 'Authorization': 'Bearer token' })",
      +  "type": "object"
      +}
    • addedInput schema / properties / url
      Added value: +{
      +  "description": "MCP server URL for HTTP/SSE transport (e.g. 'http://localhost:3000/mcp')",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "command"
      -]
  2. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It explains the scan purpose and the threat model (tool shadowing attacks) but does not disclose other behavioral traits such as whether it modifies state, requires network access, or produces output beyond scanning. Adequate but not detailed.

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, no superfluous words, front-loaded with purpose and examples. Every sentence adds value.

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?

The tool has 6 parameters for transport configuration but no output schema. The description does not explain what the scan returns (e.g., list of references or a report). Given the complexity and missing output schema, it is moderately complete.

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 coverage is 100% with 6 parameters fully described in the schema. The description adds no additional meaning about parameters, so baseline 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 clearly states the tool scans tool descriptions for cross-origin references, provides concrete examples ('when using the email tool'), and distinguishes from siblings like rt_check_tool_shadowing by focusing on references to tools from other servers.

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

Usage Guidelines3/5

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

The description implies usage for security scanning but does not explicitly state when to use this tool versus alternatives like rt_check_tool_shadowing or other rt_check_* tools. No when-not-to-use or alternative guidance is provided.

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

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/badchars/mcp-security-scanner'

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