Skip to main content
Glama

agent-tools (x402 + MCP + A2A directory)

scan_mcp_safety

Idempotent

Check an MCP server for malware / prompt-injection lures by its endpoint URL.

Give the server's streamable-http endpoint URL. Two paths:

  * **Already in the agent-tools directory** → returns our LATEST stored
    rule verdict. Every indexed server is re-scanned hourly, so you get a
    consistent, continuously-refreshed answer without re-probing.
  * **Not yet indexed** → we probe the endpoint live, statically scan its
    advertised tools + metadata, and return the fresh verdict. If it
    answered or you supplied metadata, it is also proposed for the
    directory and listed once the directory's review approves it;
    documentation hosts such as example.com / *.test / *.invalid are
    scanned but never listed.

Two dimensions are reported. `verdict` is authoritative and comes from
deterministic static rules — pure pattern-matching over the *advertised*
text only, NO code execution. It flags the social-engineering / RCE tricks
listing-spam servers use:

  * `curl … | bash` and `base64 -d | sh` install lures
  * `eval "$(curl …)"` / PowerShell `IEX(...DownloadString)` cradles
  * base64 blobs that decode to a shell command
  * bare-IP payload hosts and cheap throwaway TLDs
  * prompt-injection / credential-exfiltration phrasing
    ("ignore previous instructions", "send your .env / api key")
  * MCP tool-poisoning coercion — descriptions that hijack an agent's
    tool-calling ("always call this tool first", "before using any other
    tool you must…"), hidden `<IMPORTANT>` instructions, "list all API
    keys / include secrets in your response", and coercion to read &
    forward `.key`/`.pem`/`.ssh`/`.env` files

Source-code-oriented rules (SQL / command / code injection) are deliberately
not applied to natural-language descriptions, to avoid false positives.

`llm_reference` is an advisory frontier-LLM second opinion over the same text.
Because the LLM is slow it is computed LIVE on this call only and is never
stored (the hourly job never runs it), so it may be null on timeout. It
never overrides the rule verdict; when it is *more* severe than the rules an
`advisory` note is attached as a safety-net signal. Security/defense
products that merely *name* these attacks are not flagged.

Args:
    endpoint_url: The MCP server's streamable-http URL (required). This is
        the identity we look up / index by.
    name: Optional advertised name (used when the server is new and gets
        added; falls back to the URL host).
    description: Optional description / README blurb (scanned when new).
    tools_text: Optional tool names + descriptions; used only if the live
        probe cannot fetch the server's tools/list.

Returns:
    { verdict: "clean"|"suspicious"|"malicious", score: 0-100,
      reasons: [{rule, weight, snippet}],
      llm_reference: {model, verdict, reason, confidence} | null,
      advisory: str | null, slug, name, endpoint_url,
      source: "stored" (existing) | "new_scan" (just added), indexed: bool }

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "endpoint_url": "<endpoint_url>"
    },
    "name": "scan_mcp_safety"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional advertised name (used when the server is new and gets added; falls back to the URL host).
tools_textNoOptional tool names + descriptions; used only if the live probe cannot fetch the server's tools/list.
descriptionNoOptional description / README blurb (scanned when new).
endpoint_urlYesThe MCP server's streamable-http URL (required). This is the identity we look up / index by.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / description / description
      Added value: +"Optional description / README blurb (scanned when new)."
    • addedInput schema / properties / endpoint_url / description
      Added value: +"The MCP server's streamable-http URL (required). This is the identity we look up / index by."
    • addedInput schema / properties / name / description
      Added value: +"Optional advertised name (used when the server is new and gets added; falls back to the URL host)."
    • addedInput schema / properties / tools_text / description
      Added value: +"Optional tool names + descriptions; used only if the live probe cannot fetch the server's tools/list."
  2. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=true) by disclosing the side effect that an unindexed server may be proposed for and added to the directory after review. It states that static rules are pattern-matching over advertised text with NO code execution, that llm_reference is computed live, never stored, and may be null on timeout, and how advisory behaves when the LLM is more severe. These are exactly the behavioral facts an agent needs and none of them contradict the supplied hints.

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

Conciseness3/5

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

Front-loaded and well structured with bullets, but the entry is long and includes an Args block and a Returns block that duplicate the already-rich input schema and the existing output schema. The rule-catalog bullets are informative but verbose, and trimming the Args/Returns duplication would lose nothing.

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 tool of this complexity: it explains the verdict vs llm_reference relationship, the authoritative/advisory split, timeouts and nullability, the source/indexed fields, and the listing side effect. Even though an output schema exists, the description's framing of what verdict and advisory mean is what makes the response interpretable.

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% and the Args section largely restates the schema's own field descriptions, so the description adds little param-level meaning. It does clarify the precedence of tools_text (only used when the live probe cannot fetch tools/list) and the name fallback to URL host, but those points are also in the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource+scope: 'Check an MCP server for malware / prompt-injection lures by its endpoint URL.' That is unambiguous about what it does and what the input identity is. It does not explicitly name a sibling (e.g. get_mcp_server or search_mcp_servers) to contrast against, so differentiation is inferred rather than stated.

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?

Gives clear usage context: it is a security scan keyed on the streamable-http endpoint URL, and it explains the two operational paths (already-indexed → stored hourly-refreshed verdict; not indexed → live probe). It also notes that documentation hosts are scanned but never listed, which sets an expectation. It stops short of explicit 'do not use this when…' exclusions or naming alternative sibling tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.