Skip to main content
Glama

scan_to_sarif

Scans a local path or public repository to produce a SARIF 2.1.0 report for GitHub code scanning, enabling MCP server source audits before agent connection.

Instructions

扫描本地路径或公开仓库并直接返回 SARIF 2.1.0 文档(可上传 GitHub code scanning)

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": "scan_to_sarif"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo本地绝对路径(与 repo_url 二选一)
repo_urlNo公开仓库 URL(与 path 二选一)
include_testsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the return format (SARIF 2.1.0) and the notable 'public repo only' constraint, which are real behavioral facts. It says nothing about whether the operation is read-only, whether it writes files locally, network access, runtime, or auth requirements, which leaves significant gaps for a scanning tool.

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?

The definition is a single tightly packed sentence with the resource scope front-loaded and the output artifact in the parenthetical. There is no filler or redundancy.

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 description is adequate for a small tool with 3 parameters and no output schema, and it does specify the returned document type in place of an output schema. However, it leaves it unclear that one of path or repo_url must be supplied, even though required parameters number zero, and it never covers include_tests, which are gaps a caller must resolve elsewhere.

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 67%. The description echoes the path/repo_url mutual exclusivity that the schema already states ('与 path 二选一'), which adds nothing new. It never mentions include_tests, so a parameter the schema documents is absent from the description as well.

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?

The description names a specific verb (scan) and two concrete resources (a local path or a public repository), and it also states the exact output artifact: a SARIF 2.1.0 document. This distinguishes it from scan_public_repo and scan_mcp_server in output format, although it never names those siblings explicitly.

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 parenthetical '(可上传 GitHub code scanning)' implies the intended use case, which is producing SARIF for GitHub code scanning. However, the description never states when to choose this tool over scan_public_repo or scan_mcp_server, nor does it give any exclusions or prerequisites.

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