Skip to main content
Glama

lint_files

DestructiveIdempotent

Inspect specified files for hardcoded secrets and optionally replace them with process.env.KEY references while storing values in the q-ring keyring. Read-only unless fix is enabled.

Instructions

[scan] Inspect a specific list of files for hardcoded secrets and, when fix is true, replace each finding with process.env.KEY while storing the extracted value into the keyring. Use to migrate a known set of files (e.g. just-changed files in a pre-commit hook) into q-ring; prefer scan_codebase_for_secrets for a whole-tree audit and import_dotenv to ingest an existing .env. With fix: false this is read-only. With fix: true this MUTATES the listed source files in place (review with git diff!) and writes one new secret per finding to the keyring. Returns a JSON array of { file, line, key, value, kind } findings, or 'No hardcoded secrets found in the specified files.'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fixNoIf true, rewrite the source files to read `process.env.KEY` and store the extracted value in the keyring. If false (default), only report findings.
filesYesAbsolute or relative paths to lint. Non-existent paths surface as scan errors.
orgIdNoOrganization identifier for org-scoped secrets. Required only when scope='org'. Example: 'acme-corp'.
scopeNoWhere the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId).
teamIdNoTeam identifier for team-scoped secrets. Required only when scope='team'. Example: 'acme-platform'.
projectPathNoAbsolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.11.7
    • changedInput schema / properties / files / description
      Previous value: -"File paths to lint"New value: +"Absolute or relative paths to lint. Non-existent paths surface as scan errors."
    • changedInput schema / properties / fix / description
      Previous value: -"Auto-replace and store secrets"New value: +"If true, rewrite the source files to read `process.env.KEY` and store the extracted value in the keyring. If false (default), only report findings."
    • changedInput schema / properties / orgId / description
      Previous value: -"Org identifier for org-scoped secrets"New value: +"Organization identifier for org-scoped secrets. Required only when scope='org'. Example: 'acme-corp'."
    • changedInput schema / properties / projectPath / description
      Previous value: -"Project root path for project-scoped secrets"New value: +"Absolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted."
    • changedInput schema / properties / scope / description
      Previous value: -"Scope: global, project, team, or org"New value: +"Where the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId)."
    • changedInput schema / properties / teamId / description
      Previous value: -"Team identifier for team-scoped secrets"New value: +"Team identifier for team-scoped secrets. Required only when scope='team'. Example: 'acme-platform'."
  2. Addedv0.11.5

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, but the description adds materially: fix:false is read-only, fix:true mutates listed source files in place, writes one new secret per finding to the keyring, advises reviewing with git diff, and discloses the return shape. This is rich behavioral context beyond the structured fields.

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?

Front-loads the primary action, then routes to alternatives, then covers the mutation/read-only split and the return value. Dense but every sentence carries information relevant to calling it correctly.

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?

Covers action, alternatives, the risky fix flag semantics, and the return format (with the empty-result string). For a destructive, six-parameter tool with no output schema, nothing an agent needs is missing.

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 description coverage is 100%, so all six parameters are already documented in the schema. The description reinforces the fix flag's dual behavior but adds no syntax or format detail beyond what the schema fields already provide, so the 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?

States a specific verb (Inspect/scan) and resource (a specific list of files) plus the conditional mutation behavior. It also explicitly distinguishes itself from scan_codebase_for_secrets and import_dotenv, so the agent can tell them apart 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?

Gives explicit when-to-use ('migrate a known set of files, e.g. just-changed files in a pre-commit hook') and names two alternatives with the conditions that select them (whole-tree audit vs. .env ingestion). Nothing is left to inference.

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