Skip to main content
Glama

readfirst

What to read and check before you — or your AI agent — change a file.

Coding agents can follow imports. What they don't know is what your team knows: "amounts here are in cents", "this table is read by the mobile app, keep old columns", "run the payment e2e after touching this". readfirst keeps that knowledge in one file next to the code and hands it out, file by file, at the moment someone is about to change something.

npx readfirst read src/imports.mjs prints the rules, risks, checks, tests and callers for that file

No server, no account, no model calls. MIT. It reads your git checkout and .readfirst/map.json.

What it caught

Making maps for open source projects, a check for lines whose result is thrown away found real bugs. The ones already with their maintainers:

Related MCP server: codemap

Start

Any language; needs Node 20+.

npx readfirst init --agent --ci   # a first map, your agents wired to it (Claude Code, Cursor, Codex, Gemini, ...), the PR Action
npx readfirst read <file>         # before changing a file: its rules, risks, checks, tests and callers
npx readfirst verify              # before you finish: the checks pass and nothing the map ties to the change was left out

Commit .readfirst/map.json. Filled maps for real repositories (vercel/ai, cal.com, excalidraw and two more): examples/.

Everything else (Claude Code plugin and hook, MCP for any agent, Cursor rules, the GitHub Action, the map format, audit, find, monorepos, pinning a version): the guide.

Hosted

The CLI, hook, MCP server and Action are free and never send your code anywhere. The readfirst-app GitHub App can write the first map for you (free once per account) and, on Pro, keep it in step after merges and comment on pull requests. Details in the guide.

License

MIT

Available Tools

5 tools
audit_repoA

The whole repository against .readfirst/map.json, as a report: rules and risks whose files changed a lot since they were written, hot spots that moved, groups never filled in, code no test reaches through imports, and what readfirst could not see. Use it before larger work, or to decide what to add to the map.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description bears the full burden. It implies a non-mutating analysis that returns a report and enumerates the findings, but never explicitly states it writes nothing, what format the report takes, or whether it is expensive to run on a large repo.

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?

A single dense sentence whose list of findings is front-loaded and each item carries information. The colon-list construction is slightly awkward as the opening clause lacks a verb, but no wording is wasted.

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?

With no annotations, no output schema, and no parameters, the description is the only source of information. It describes what the report covers, which is its main job, but omits the report's form (text vs. structured data) and any cost or side-effect expectations.

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?

The tool takes zero parameters, so the schema leaves nothing to explain; the baseline of 4 applies. The description correctly scopes the tool to an implicit whole-repository target rather than suggesting any selection inputs.

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 enumeration of report contents (rules/risks, hot spots, empty groups, unreachable code, blind spots) makes clear this is a repo-wide audit against .readfirst/map.json, which distinguishes it from narrower siblings like check_map. However, the description opens with a noun fragment rather than a verb, so the action itself is only implied by the tool name.

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?

Explicitly states when to invoke it: 'Use it before larger work, or to decide what to add to the map.' That is clear context for a pre-work audit. It does not name when to prefer check_map or read_list instead, so the routing among siblings 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.

changed_read_listA

The same read list for every file changed on this branch since the base (default origin/main, else main). Call it before finishing, then run the checks it lists.

NameRequiredDescriptionDefault
baseNogit ref to compare against

TDQS

A3.9/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 behavioral burden. It discloses the useful default base behavior and that the result lists checks to run, but it does not explicitly state that the operation is read-only, whether it can fail outside a git branch context, or any permission/rate-limit expectations.

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 description is two compact sentences with no filler. It front-loads the scope and then gives the required follow-up action, making it easy to scan.

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 simple tool with one optional parameter and no output schema, the description is nearly complete: it explains the scoped result, the default base behavior, and the intended lifecycle use before finishing. It could be stronger by clarifying the return shape or the alternatives, but the essentials are present.

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 100%, so the baseline is 3, but the description adds meaningful semantics beyond the schema by specifying the default base resolution: origin/main first, then main. That is directly relevant to how the agent should reason about the optional base parameter.

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 states a concrete scope: it returns the read list for every file changed on the branch since a base ref. It is clearly distinguished from the broader sibling read_list by the 'changed on this branch since the base' scoping, though the phrase 'same read list' is slightly indirect rather than a direct verb-resource statement.

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?

It gives an explicit usage trigger: 'Call it before finishing, then run the checks it lists.' That tells the agent both when to invoke it and what to do with the result. It does not mention when not to use it or explicitly compare against read_list or check_map.

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

check_mapA

Whether .readfirst/map.json still covers the code: files in no group, patterns that match nothing, broken rules.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations and no output schema, the description carries the full burden. It does usefully disclose what kinds of problems it detects, but never states that it is read-only / non-mutating, whether it rewrites map.json, or how results are surfaced (pass/fail vs. list of issues).

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?

A single compact sentence with the subject (map.json coverage) front-loaded and the finding categories enumerated after a colon. Slightly telegraphic in its opening clause but no wasted text.

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 a trivial zero-param tool this is close to sufficient, but with no output schema the description should indicate what comes back — e.g. whether it returns a boolean, a list of issues, or a count — which it does not. The mutation/safety profile is also unaddressed.

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?

The tool takes zero parameters, so the schema baseline of 4 applies. Nothing in the description needs to explain inputs, and it correctly presents itself as a no-argument check.

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?

Names the exact resource (.readfirst/map.json) and the check being performed — coverage still being valid — plus the three finding categories reported (ungrouped files, orphaned patterns, broken rules). It reads clearly as a staleness/lint check and is distinguishable from read_list/changed_read_list, though 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?

Usage is only implied: an agent can infer this is run to validate the map file before or after code changes. There is no explicit when-to-use trigger, no prerequisites, and no mention of when the sibling tools would be the better choice.

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

find_existingA

Before writing a new function, helper or module: the functions, classes, files and map entries that may already do it, matched by words (not meaning) against names and paths. Give a few words about what it does, e.g. "payment retry" or "csv export". If one fits, use or extend it instead of writing another.

NameRequiredDescriptionDefault
queryYesa few words about what you are about to write

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose the most consequential trait: matching is lexical, not semantic, so a caller must choose literal terms rather than describe intent. It says nothing about result ordering, result limits, or what each match contains, which matters because there is no output schema to fall back on.

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?

The when-to-use clause is front-loaded ahead of what the tool returns and how to act on results, which is the right order. Three sentences, no filler, though the colon-joined first sentence reads as a fragment and takes a second pass to parse.

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 one-parameter lookup with no output schema and no annotations, the description covers the trigger, the matching semantics, and the intended next action. The main remaining gap is what a result looks like (paths only? snippets? ranked?), which an agent may want before deciding whether to act on a hit.

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 100% and there is a single parameter, so the baseline is 3. The description earns above that by supplying concrete query examples ('payment retry', 'csv export') that show the expected granularity and shape of input, which the schema's 'a few words' wording alone leaves ambiguous.

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 states a specific action and target: it returns functions, classes, files and map entries that may already implement what the caller is about to write. It also pins the matching mechanism (words, not meaning, against names and paths), which distinguishes it from a semantic search. It stops short of naming any sibling tool, so the differentiation from check_map and read_list is inferred rather than stated.

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?

Timing is explicit ('Before writing a new function, helper or module') and the follow-up action is prescribed ('use or extend it instead of writing another'), which is stronger guidance than most tools give. It does not name alternatives or state when not to bother calling it, so it lands at 4 rather than 5.

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

read_listB

What to read and check before changing these files: the project rules and risks that apply, the checks to run, the tests that reach the code and the files that use it. Call it before editing.

NameRequiredDescriptionDefault
filesYespaths relative to the repository root

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden. It does disclose the categories of content returned (rules, risks, checks, tests, dependents), which is real value. It says nothing about cost, latency, failure behavior on unknown paths, or the shape/size of the response.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single sentence with no filler, but it is a dense colon-list that front-loads an indirect phrase ('What to read and check before changing these files') rather than the tool's action. The action-bearing instruction arrives last, which is the wrong order for fast scanning.

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?

There is no output schema and no annotations, so the description is the only source of information. It partially compensates by listing content categories, but an agent still cannot tell what the return value actually looks like or how to act on it, which matters for a pre-edit gating step.

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 there is only one required parameter ('files', documented as repo-root-relative paths). The description adds only the implicit framing 'these files' and introduces no additional syntax, path conventions, or size expectations beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description conveys the resource indirectly — it enumerates what the tool surfaces (project rules, risks, checks, tests, dependent files) for a set of files. But it never states a verb+resource plainly ('returns a reading list for the given files'), and the name 'read_list' plus the sibling 'changed_read_list' leave the scope boundary unstated. Purpose is inferable but not crisp.

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?

'Call it before editing' gives an explicit trigger condition, which is clear context for when to use it. It stops short of an exclusion or an alternative: nothing says whether to use this instead of 'changed_read_list' or 'check_map', or what to do when files are new/untracked.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.15.0
    • Addedaudit_repo
    • Addedfind_existing
  2. 3 tool updatesv0.1.0
    • First observedchanged_read_list
    • First observedcheck_map
    • First observedread_list

TDQS

A3.7/5.0

Scored across 5 tools

Disambiguation4/5

Tools are largely distinct: find_existing searches for existing code, read_list prepares edits for given files, changed_read_list does the same for branch changes, check_map validates map coverage, and audit_repo reports repo-wide issues. The only mild overlap is read_list vs changed_read_list and audit_repo vs check_map, but their scopes are clarified in the descriptions.

Naming Consistency4/5

All names use snake_case and are readable. However, the set mixes verb-led names (find_existing, audit_repo, check_map) with noun-phrase names (read_list, changed_read_list), so it is not a strict verb_noun pattern throughout.

Tool Count5/5

Five tools is well within the appropriate range and each maps to a distinct workflow step: search, per-file read list, changed-file read list, map validation, and repo audit. No tool feels redundant or missing for the stated scope.

Completeness4/5

The surface covers the core read-before-change workflow: discovery, per-file guidance, branch-level guidance, map validation, and repo-wide audit. A minor gap is the absence of a tool to update or regenerate the map, though the server appears intentionally read-only.

Maintenance

ActivityMaintained
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Auto-generates and refreshes a budget-bounded codebase map inside AGENTS.md for MCP-enabled coding agents, with tools to return, update, and check the map.
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Gives coding agents read-only tools that return, in one call, a declaration's callers traced up to entry points or its callees down to 8 levels, plus a map of directories, files, declarations and every usage of a symbol. Maps TypeScript, JavaScript, Go, Python and Java using each language's own compiler, so a change's impact can be traced across imports, methods, interfaces and decorators.
    4
    945 npm
    8
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Enables coding agents to map a multi-repo workspace by resolving which repository a service name refers to, reading short per-repo cards, listing related repos with file-and-line evidence, finding where a table, package, path, or symbol lives across repositories, and refreshing the map. It answers orientation, localization, and cross-repo impact questions without the agent re-exploring every sibling repo.
    12
    25 PyPI
    4
    Apache 2.0