Skip to main content
Glama

Run AST & Link-Aware Static Analysis

check
Read-onlyIdempotent

Scans source files with AST and link-budget rules after code edits, returning SARIF-compatible findings for missing timeouts, swallowed errors, hardcoded secrets, and money floats without running code.

Instructions

Scan source code files (Python, Rust, TypeScript, JavaScript, C, and C++/Arduino) using single-pass deterministic AST guardrails, physical-layer link rules, and optional external compiler or linter gates, returning structured findings and SARIF-compatible diagnostics. Use this after creating or editing code to catch missing timeouts, swallowed errors, money floats, hardcoded secrets, and link-budget violations without executing the program.

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

Input Schema

NameRequiredDescriptionDefault
hzNoAssumed transmit rate in Hertz used when evaluating physical-layer link rules (defaults to 10.0 Hz).
pathNoOptional relative file path or subdirectory within the workspace to scan. Omit to scan the entire project.
profileNoOptional RF or serial link profile ID (for example: lora-sf12, ble-1m, wifi-24g-congested, leo-sat, or uart-9600) used to enforce loop-send batching, framing, and timeout rules.
ast_onlyNoWhen true, run only built-in deterministic AST rules and skip external compiler or linter subprocess gates (defaults to false).
pedanticNoWhen true, enable stricter pedantic static-analysis rules in addition to default quality gates (defaults to false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.4.11
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / ast_only / description
      Added value: +"When true, run only built-in deterministic AST rules and skip external compiler or linter subprocess gates (defaults to false)."
    • addedInput schema / properties / hz / description
      Added value: +"Assumed transmit rate in Hertz used when evaluating physical-layer link rules (defaults to 10.0 Hz)."
    • addedInput schema / properties / hz / minimum
      Added value: +0.001
    • changedInput schema / properties / path / description
      Previous value: -"Optional subpath or file to scan"New value: +"Optional relative file path or subdirectory within the workspace to scan. Omit to scan the entire project."
    • addedInput schema / properties / pedantic / description
      Added value: +"When true, enable stricter pedantic static-analysis rules in addition to default quality gates (defaults to false)."
    • changedInput schema / properties / profile / description
      Previous value: -"Optional RF/serial link profile ID (e.g. lora-sf12)"New value: +"Optional RF or serial link profile ID (for example: lora-sf12, ble-1m, wifi-24g-congested, leo-sat, or uart-9600) used to enforce loop-send batching, framing, and timeout rules."
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds genuinely new behavioral facts: analysis is single-pass and deterministic, external compiler/linter gates are optional subprocesses that can be skipped, and the program is never executed. It does not discuss cost, runtime, or severity/exit-code behavior, so it is not fully exhaustive.

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?

Two sentences, with the capability statement front-loaded before the usage trigger, and no filler. The parenthetical language list and rule enumeration are dense but each item is informative; the second sentence is somewhat overloaded with a long finding list.

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?

With no output schema, the description carries the return-value burden and does so by naming 'structured findings and SARIF-compatible diagnostics'. For a zero-required-parameter scanner with fully documented inputs this is nearly sufficient, though it leaves unstated whether findings block, are advisory, or include severities.

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 100% and every parameter carries a detailed inline description including defaults and example profile IDs, so the schema does the heavy lifting. The tool description adds only indirect meaning (that 'profile' drives link rules and 'ast_only' skips compiler gates) rather than per-parameter semantics beyond the schema; baseline 3 applies.

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 names a specific verb and resource ('Scan source code files'), enumerates supported languages, and describes the mechanism (deterministic AST guardrails, physical-layer link rules, optional external compiler gates). The clause 'without executing the program' implicitly separates it from the runtime sibling verify_runtime, so an agent can place it without opening the schema.

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?

'Use this after creating or editing code' gives a clear triggering context, and the rule categories listed (missing timeouts, swallowed errors, money floats, hardcoded secrets, link-budget violations) tell the agent what class of problem this tool is for. There is no explicit when-not guidance or named alternative such as verify_runtime for post-deploy checks, which keeps it below a 5.

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