Skip to main content
Glama

agent-tools (x402 + MCP + A2A directory)

scan_mcp_safety

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, ADD it to the directory, and return the
    fresh verdict (so the next caller gets the rule verdict instantly from
    cache).

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 }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
tools_textNo
descriptionNo
endpoint_urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the burden. It discloses that scanning is static (no code execution), details the detection rules, explains the two dimensions (verdict and llm_reference), caching behavior, and potential null values. No contradictions.

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 description is long but well-structured with sections and bullet points. It is front-loaded with the main purpose. While comprehensive, a slight reduction in verbosity could improve conciseness without losing essential detail.

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 the tool's complexity (two paths, multiple rule types, LLM advisory, caching, output schema), the description is complete. It covers edge cases like null llm_reference and advisory notes, and the output schema is effectively documented in the description.

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

Parameters5/5

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

Schema description coverage is 0%, but the description provides detailed semantics for all four parameters. endpoint_url is explained as the identity, and name, tools_text, and description have their roles clearly described, compensating for the schema gap.

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 checks an MCP server for malware/prompt-injection lures by its endpoint URL. It uses specific verbs (Check, scan) and resource (MCP server) and is distinct from sibling tools which are for search, listing, and retrieval.

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?

The description explains two paths based on whether the server is already indexed, providing clear usage context. It does not explicitly mention when not to use this tool versus alternatives, but siblings do not overlap in functionality, so the context is sufficient.

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.

TDQS

A3.8/5.0
Disambiguation4/5

Tools are mostly distinct with clear purposes. However, 'search', 'search_mcp_servers', 'search_a2a_agents', 'search_resources', and 'ask_services' have overlapping discovery functions, though descriptions differentiate them (e.g., LLM ranking vs deterministic). This could slightly confuse an agent.

Naming Consistency3/5

Naming conventions are mixed: some follow 'verb_noun' (e.g., ask_services, list_categories), some are single verbs (get, register, search, stats), and some use underscores (search_a2a_agents, search_mcp_servers). The pattern is not fully consistent but remains readable.

Tool Count5/5

11 tools is well within the recommended 3-15 range for a directory server covering x402, MCP, and A2A services. Each tool serves a distinct purpose without bloat.

Completeness4/5

The toolset covers core directory operations: discovery (multiple search variants), details, registration, safety scanning, and stats. Missing update/delete for services is a minor gap but not critical for basic usage.