Skip to main content
Glama

Typed per-file decisions

decide_files

Classify files by asking typed yes/no, choice, or ordered-score questions with a decision model, returning calibrated probabilities and filtering to files that match a yes/no question.

Instructions

Ask several typed questions about EACH file with a decision model: yes_no flags, one-of choices and ordered scores, with calibrated probabilities. Example: for every file decide uses_db (yes_no), layer (choice: api/domain/ui/infra), complexity (score: low/medium/high). Use only_matching to return just the files where a yes_no question is yes.

Input Schema

NameRequiredDescriptionDefault
modelNoOverride the OpenRouter decision model for this call, e.g. cloudflare/clef (see list_models)
pathsYesFiles and/or directories to read (absolute or relative to the project root)
formatNoOutput format (default table)
dry_runNoOnly list which files would be scanned and the estimated tokens; no API call
excludeNoExtra globs to skip, e.g. ["**/*.test.ts"]
includeNoGlob patterns inside directories, e.g. ["**/*.ts", "docs/**/*.md"]. Default: all text files
questionsYes
instructionsNoShared context added to every question
only_matchingNoReturn only files where this yes_no question id is 'yes'
respect_gitignoreNoSkip files ignored by the directory's .gitignore (default true)
max_chars_per_fileNoTruncate each file to this many chars, keeping head and tail (default 12000; capped to the model's context)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the key behavioral trait that answers come from a decision model with calibrated probabilities (i.e. LLM-backed, non-deterministic), but it omits practical consequences: one model call per file means cost and latency scaling with path count, answers may be probabilistic rather than ground truth, and no mention of what a failed or truncated file yields.

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?

Three sentences, front-loaded with the core operation, then a concrete example, then a targeted hint about only_matching. Nothing is padded, though the example slightly duplicates the per-field schema descriptions of `options` and `yes`/`no`.

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?

For an 11-parameter tool with a nested questions array, no annotations and no output schema, the description covers the central concept and question types but leaves gaps: cost/latency implications of per-file model calls, the shape of the returned table (answer columns per question id), and how it relates to classify_files. The 91% schema coverage fills most parameter gaps, keeping this at minimum-viable rather than poor.

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 91%, so baseline is 3, but the description goes beyond it by explaining what each question type means (yes_no flags, one-of choices, ordered scores) and by spelling out only_matching's filtering role with a concrete use. This is valuable because the schema's `type` enum has no description of its own.

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?

States a specific verb and resource (ask typed questions about each file) plus the three question types and that answers carry calibrated probabilities. An agent can picture the operation precisely. However, it never distinguishes this from sibling classify_files, which sounds like an adjacent capability, so the agent has to guess which one to pick.

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?

Usage is only implied through a worked example ('for every file decide uses_db, layer, complexity') and a directive for only_matching. There is no statement of when to prefer this over classify_files, no exclusions, and no prerequisites such as the project root or model availability.

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