Skip to main content
Glama
fairquery-agent-trust-mcp

fairquery-agent-trust-mcp

Official

Pre-check an MCP server (free local scan; optional paid audit)

mcp_server_precheck
Read-onlyIdempotent

Scan MCP server tool names, descriptions and parameters for injection phrasing, hidden characters and cross-server shadowing before install, returning an ok, review or block verdict.

Instructions

WHAT: Pre-install check for one MCP server. Scans tool names, descriptions and parameter text for injection phrasing, concealed characters, hidden markup and cross-server shadowing. meta.verdict is ok, review or block, with why holding up to three plain findings. WHEN: Before installing or enabling an MCP server, once you have a tools/list result, the package on disk, or an npm package name. WHEN NOT: For a dependency audit with no tool list, call osv_audit_dependencies. For a few exact versions, call osv_query_packages. For an install, pin or block label on a dependency, call osv_install_verdict. This tool does not install, start or execute the package. remoteUrl is not available. COST: The scan is free. A packageName that is not on disk is read from registry.npmjs.org (no Apify charge). auditDependencies=true is optional and bills YOUR Apify account via your APIFY_TOKEN: $0.50 per 1,000 packages + $1.50 per 1,000 vulnerabilities found. That mode also looks up license and publish age on the public npm registry (package name only) when the tarball was not already read. With no token the scan still returns and the audit row is APIFY_TOKEN_MISSING. RETURNS: Paged "finding" rows (rule, severity, tool, field, evidence) and, when an audit was requested, one "dependency_audit" row plus any OSV rows. meta.verdict is ok, review or block. meta.why is up to three plain findings. critical or high maps to block, medium to review, and anything else to ok, except risk_level not_assessed which is review and never ok. meta.shared_externally.tool_names_and_descriptions is always false. Errors: INPUT_EMPTY, INVALID_JSON, INVALID_PACKAGE_NAME, PATH_NOT_FOUND, PATH_NOT_ALLOWED, INPUT_TOO_LARGE, REMOTE_URL_NOT_SUPPORTED, REGISTRY_NOT_FOUND, REGISTRY_FETCH_FAILED, REGISTRY_NO_LATEST, TARBALL_TOO_LARGE, TARBALL_INVALID, TARBALL_HOST_NOT_ALLOWED. BEHAVIOR: tools, toolsListJson and path: no network calls and no process spawn. Reads only package.json, package-lock.json, npm-shrinkwrap.json, manifest.json and server.json inside a directory you name, or one .json file you name. Refuses sensitive filenames and does not follow a symlink that leaves that directory. packageName on disk uses that copy and does not download. packageName that is not on disk GETs the public npm packument and then the tarball, one after the other, with User-Agent Fairquery (info@getfairquery.com). Only package.json, manifest.json and server.json are unpacked in memory. The package is not installed and no lifecycle script is run. Maintainer emails are removed from the result. remoteUrl is refused and no connection is opened. auditDependencies=true may call the OSV Actor (300 s timeout). PARAMETERS: At least one of tools, toolsListJson, path or packageName (none of them -> INPUT_EMPTY, not billed). remoteUrl is refused with REMOTE_URL_NOT_SUPPORTED and nothing else runs. tools: structured tools/list entries. toolsListJson: raw JSON of a tools/list result, an MCPB manifest or a tools array; invalid JSON -> INVALID_JSON and nothing else is read. path: a local directory or a .json file; a sensitive basename -> PATH_NOT_ALLOWED and the file is not read. packageName: npm name. On disk it is node_modules/ under path or the working directory, or a directory whose package.json name matches. If it is not on disk, the published tarball is read from registry.npmjs.org. Each field is scanned up to 20,000 characters and the raw total must be <= 500,000. auditDependencies defaults to false. minSeverity and includeDevDependencies are forwarded to the OSV Actor only when the audit runs (same meaning as osv_audit_dependencies). limit/offset page the combined rows. When the audit flag is true, every call runs the paid audit again, including a call that only changes offset. EXAMPLE: {"tools":[{"name":"sum","description":"Add two numbers."}]} -> verdict "ok", risk_level "none", why [], shared_externally.tool_names_and_descriptions false. A critical finding returns verdict "block".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mcp_server_precheck"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoOptional if tools, toolsListJson or packageName is given. Local directory, or a .json file (tools/list, package.json, manifest.json). Example: "/tmp/some-mcp"
limitNoOptional page size: items to return, integer 1-1000 (default 100). Example: 50
toolsNoOptional if toolsListJson, path or packageName is given. 0-400 tools, as returned by tools/list. Example: [{"name":"sum","description":"Add two numbers."}]
offsetNoOptional zero-based number of items to skip, integer 0-1000000 (default 0); pass nextOffset from the previous response, e.g. 100
remoteUrlNoNot accepted. A remote MCP URL is on hold. Passing it returns REMOTE_URL_NOT_SUPPORTED and no connection is opened
minSeverityNoOptional, one of "ALL" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL", default "ALL". Forwarded to the OSV Actor only when auditDependencies is trueALL
packageNameNoOptional if tools, toolsListJson or path is given. npm package name, e.g. "@scope/server" or "some-mcp". An installed copy is used when present. Otherwise the published tarball is read from registry.npmjs.org and not installed
toolsListJsonNoOptional if tools, path or packageName is given. Raw JSON (<= 2,000,000 chars) of a tools/list result, {"tools":[...]}, an MCPB manifest, or a tools array. Example: "{\"tools\":[{\"name\":\"sum\",\"description\":\"Add two numbers.\"}]}"
auditDependenciesNoOptional boolean, default false. true also audits a local package.json or package-lock.json with the OSV Actor (paid) and adds license and npm publish-age facts. Example: false
includeDevDependenciesNoOptional boolean, default true. Forwarded to the OSV Actor only when auditDependencies is true; false skips devDependencies

Output Schema

NameRequiredDescriptionDefault
metaNoTool-specific context (summary counts, cost notes, ...)
countYesNumber of items in this page
itemsYesResult rows for this page
totalYesTotal items before paging
offsetYesOffset of the first item in this page
hasMoreYesTrue if more items exist after this page
nextOffsetYesOffset to pass for the next page, or null

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.2

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only say readOnly/openWorld/idempotent/non-destructive; the description goes far beyond by disclosing which files are read, that no network or process spawn occurs for tools/toolsListJson/path, symlink and sensitive-filename refusal, the exact registry fetch sequence and User-Agent, that no lifecycle script runs, that maintainer emails are stripped, and the 300 s OSV Actor timeout. It also flags that a paid audit re-runs on every call, including offset-only changes, which is billing behavior no annotation conveys.

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 WHAT/WHEN/WHEN NOT/COST/RETURNS/BEHAVIOR/PARAMETERS/EXAMPLE scaffolding front-loads the decision-relevant facts and keeps a dense definition navigable. It loses a point for repetition, notably the verdict thresholds (critical/high→block, medium→review, not_assessed→review) stated in both the opening and the RETURNS block, and an exhaustive 13-code error list that is longer than an agent needs.

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?

For a 10-parameter tool with an output schema, the definition still covers cost and billing ownership, error conditions, privacy of shared data, and a worked example mapping input to verdict. Nothing an agent needs in order to call it correctly or predict the charge is missing.

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 coverage is already 100%, but the description adds constraints the schema cannot express: at-least-one-of tools/toolsListJson/path/packageName with INPUT_EMPTY otherwise, remoteUrl refused with nothing else running, on-disk packageName resolution before registry fallback, the 20,000-char per-field and 500,000-char total scan caps, and that minSeverity/includeDevDependencies are forwarded only when the audit runs.

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?

"Pre-install check for one MCP server" plus an explicit enumeration of what is scanned (tool names, descriptions, parameter text; injection phrasing, concealed characters, hidden markup, cross-server shadowing) gives a specific verb and resource. The WHEN NOT block names the sibling tools it is not, so an agent can route without opening any schema.

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 WHEN section states the prerequisite inputs (tools/list result, package on disk, or npm name) and the WHEN NOT section routes to three named alternatives with the condition that selects each. It also states explicit exclusions: it does not install, start or execute the package, and remoteUrl is unavailable.

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