Skip to main content
Glama

Análisis profundo con CodeQL

scan_codeql
Read-only

Run CodeQL semantic static analysis with data-flow queries to detect cross-file and cross-function injection vulnerabilities, build the database, and validate security findings in key projects.

Instructions

SAST semántico con flujo de datos (detecta inyecciones que cruzan funciones y archivos). Crea la base de datos CodeQL y corre la suite security-extended. Más lento que Semgrep: úsalo en proyectos clave o para confirmar hallazgos.

Input Schema

NameRequiredDescriptionDefault
pathYesCarpeta raíz del código
suiteNoSuite/paquete de consultas alternativo (por defecto <lenguaje>-security-extended)
languageYesLenguaje principal (typescript se analiza como javascript)
build_modeNonone sirve para JS/TS, Python, Ruby, Java, C#; go/cpp/swift usan autobuild
build_commandNoComando de compilación para build_mode manual
timeout_minutesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint; the description adds genuine beyond-schema context: it creates a CodeQL database as a prerequisite step and runs the security-extended query suite. It also discloses the performance profile relative to Semgrep. It does not mention where the DB is written, expected runtime, or resource cost, which would complete the picture for a long-running 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?

Three tight sentences: capability first, mechanism second, cost/usage last. Zero filler and the most decision-relevant contrast (speed vs depth) is front-and-center.

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?

For a 6-parameter scan tool with rich schema coverage and no output schema, the description covers purpose, prerequisites, and selection criteria adequately. It is silent on what the scan produces (findings schema, artifact locations) and on typical duration, which would help an agent chain into findings_query afterwards.

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

Parameters4/5

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

Schema coverage is 83%, so the schema already documents path, language, build_mode and suite thoroughly. The description reinforces the default suite behavior, but adds no new syntax, format, or constraint details for the remaining parameters. Slight credit above baseline because the suite default is confirmed in prose.

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?

States a specific mechanism (semantic SAST with dataflow tracking across functions and files), the concrete actions (builds the CodeQL database and runs the security-extended suite), and contrasts with the lighter sibling approach. An agent can tell this apart from scan_static/Semgrep without opening either 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?

Gives explicit when-to-use guidance: key projects or confirming findings, plus the cost tradeoff (slower than Semgrep) that implies when to avoid it. It references the alternative by product name rather than by sibling tool name (scan_static), which is a minor inference step but not a blocker.

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