Skip to main content
Glama
SyedAnas01

mcp-safeguard

by SyedAnas01

scan_tool_definitions

Analyze MCP tool definitions JSON to detect prompt injection and poisoning risks, providing a security assessment for tool configurations.

Instructions

Analyze MCP tool definitions JSON for prompt injection and poisoning risks.

Accepts either a JSON array of tool objects or a single tool object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tool_jsonYesJSON string of tool definitions to analyze.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.3

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, but it only mentions that the tool accepts JSON and analyzes it. It does not state whether the operation is read-only, whether it makes external calls, how it handles malformed input, or what side effects may occur.

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 filler, with the core purpose stated first. The input-format clarification is relevant and earns its place without bloating the description.

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?

For a single-parameter tool with an output schema, the description is largely complete: it states the analysis target, the risk categories, and the accepted input shape. It falls slightly short of full completeness by omitting usage routing and any side-effect or security context, though the simplicity of the tool keeps the gap small.

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?

The schema already describes tool_json as a JSON string of tool definitions, so the baseline is 3. The description adds meaningful format semantics by clarifying that the JSON can be either an array or a single tool object, which helps agents construct valid input.

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?

Description names a specific resource ('MCP tool definitions JSON') and specific risks ('prompt injection and poisoning risks'), making the tool's purpose unmistakable. It also distinguishes itself from siblings like scan_mcp_server by targeting the definitions JSON rather than a full server or endpoint surface.

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

Usage Guidelines2/5

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

The description gives no guidance on when to choose this tool over siblings such as scan_mcp_server or check_auth_config. It states what input is accepted but does not provide use-case routing, exclusions, or prerequisites.

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