Skip to main content
Glama

myopic

PyPI version Python License: MIT MCP Registry

The code-review MCP with the most ironic name in the registry. It's anything but nearsighted — it reviews your merge request against the whole codebase, not just the diff in front of it.

Building in public. Reviews GitLab merge requests and GitHub pull requests — pass either URL. Reads the change, reviews it against the whole codebase, and can post the review back as inline comments. Issues and PRs welcome.


Why

The bugs that matter rarely live in the diff. They live in what it doesn't show: the caller three files away that now breaks, the convention every sibling file follows that this one quietly drops, the helper that already exists so this new one is a duplicate. A reviewer that only reads the patch is myopic.

myopic is an open-source MCP server that gives the AI client you already use (Claude, Cursor, …) the structured context to review like someone who knows the codebase. It runs on your machine — your code never leaves it, there's no per-PR bill, and the review happens in your own agent with your own standards:

  • Read the change precisely — the diff as line-numbered hunks or grouped by function/class, token-safe on any MR size (a 10,000-line diff never overflows the context window).

  • Review it against the whole codebase — who calls the changed code (blast radius), the caller/callee graph, and — optionally — semantically similar code so you catch broken conventions and duplication.

It pairs with amnesic, my MCP server that gives AI persistent memory of SQL databases.


Related MCP server: grippy-code-review

Tools

Everything below works today unless marked planned.

Read the merge request (token-safe by construction):

Tool

What it does

mr_review_status

MR metadata + every discussion thread + resolved/unresolved, in one call

mr_changed_files

a content-free manifest of changed files (paths, stats, noise flags) — no diff content, so it stays small even on a huge MR

mr_diff_sections

the diff grouped by function/class (AST-aware), budget-bounded

mr_diff_lines

the diff as line-numbered hunks — exact positions for inline comments — budget-bounded

On a large MR, the diff tools return a bounded page and list the rest under omitted_files / truncated instead of failing; lockfiles, generated code, and binaries are listed but not expanded. Fetch the rest with files_filter.

Review against the whole codebase (point at a local clone):

Tool

What it does

dependency_impact

everywhere a changed symbol is used — the blast radius (ripgrep + tree-sitter)

trace_call_chain

the caller/callee graph of a symbol

mr_review_context

the headline — for each changed symbol: its impact (always), plus semantically similar code when the optional layer is enabled

Semantic layer (built in — needs Ollama) — index_repo, code_search, and the semantic half of mr_review_context. See below.

Close the loop — verify, and (on request) comment:

Tool

What it does

mr_verify_review

for each existing review thread, the diff changes near the commented line — did a follow-up commit address it? (read-only)

mr_post_comments

the one write — post inline comments, one at a time from a queue with exponential backoff (no drafts, no bulk-publish), so partial progress survives and rate limits are respected

See ROADMAP.md for what's next.


Install

pipx installs myopic isolated and on your PATH:

pipx install myopic

Prefer a plain venv? python3 -m venv ~/.venvs/myopic && ~/.venvs/myopic/bin/pip install myopic, then use that binary where the examples say myopic.

Setup

myopic needs a personal access token with api (or read_api) scope. The wizard walks you through it:

myopic init     # prompts for URL + token, verifies, saves both
myopic test     # ✓ Authenticated to https://gitlab.com as <you>
myopic doctor   # health-check config + (if enabled) the semantic layer

The token is saved to ~/.config/myopic/.env (chmod 600) and referenced from the TOML as ${GITLAB_TOKEN} — never in the config file itself. Rotate it with myopic set-secret, or hand-edit via myopic init --template.

GitHub PRs: just pass a PR URL. Set a GITHUB_TOKEN (a PAT with pull-request read access) in your environment or a [github] section in config.toml. For GitHub Enterprise, set [github].url to your host.

Add to your AI client

Claude Code — one command, no config editing:

/plugin marketplace add https://github.com/SurajKGoyal/myopic-marketplace
/plugin install myopic@myopic

Any other MCP client (Cursor, Claude Desktop, …) — point it at the myopic command:

{
  "mcpServers": {
    "myopic": {
      "command": "myopic"
    }
  }
}

If your client can't find it on PATH, use the absolute path (pipx installs to ~/.local/bin/myopic).

Configure inline instead of myopic init

Put the token in the env block and skip the config file — myopic reads GITLAB_TOKEN / GITHUB_TOKEN from the environment:

{
  "mcpServers": {
    "myopic": {
      "command": "myopic",
      "env": { "GITLAB_TOKEN": "glpat-…", "MYOPIC_AUTO_PULL": "1" }
    }
  }
}

MYOPIC_AUTO_PULL=1 (optional) pulls a missing embedding model on first use instead of erroring.

Use

Point your AI at a merge request:

"Review this MR: https://gitlab.com/group/project/-/merge_requests/42"

A good flow the client can follow: mr_changed_files to see the shape → mr_diff_sections (large MRs) or mr_diff_lines to read the change → then, with a local clone checked out, dependency_impact / trace_call_chain (or mr_review_context) on the risky changed symbols to review against everything that depends on them.

The graph tools analyze whatever is checked out at root, so check out the MR's branch first — otherwise you're reviewing the target branch, and the MR's new code isn't there. myopic worktree <mr-url> <repo> checks out the MR head in a throwaway worktree (your main checkout untouched) and prints the path to use as root. mr_review_context also warns when root doesn't hold the MR's head.


Semantic search (built in — needs Ollama)

For "is this consistent with the rest of the codebase?" — duplication, convention drift, similar patterns — the semantic layer covers it. It's bundled in the base install (lancedb + httpx); the only external requirement is a running Ollama.

Embeddings come from a local Ollama server you run — your code never leaves your machine. myopic talks to Ollama over HTTP; it does not bundle or launch it. The one-time prerequisites:

  1. Ollama running (default localhost:11434, or set MYOPIC_OLLAMA_URL).

  2. The embedding model pulled: ollama pull unclemusclez/jina-embeddings-v2-base-code.

myopic doctor checks both and offers to pull the model for you.

Embeddings are stored in an embedded LanceDB index with hybrid (vector + full-text) search, and mr_review_context enriches each changed symbol with semantically similar code. You don't run index_repo by hand — it indexes the repo on the first review and refreshes when stale, automatically (disable with MYOPIC_AUTO_INDEX=0; the graph pass needs no index and always runs). index_repo / myopic index remain for explicit/cron use.

Indexing is incremental and freshness-aware. The first index_repo is a full build; after that only files whose content changed are re-embedded, so refreshing is cheap. index_status(root) reports whether the index is fresh, stale (with how many commits behind main), or built on a different model — freshness is measured against the repo's main line, not the current checkout, so reviewing a feature branch never marks the index stale; only main actually moving does. code_search and mr_review_context carry that status so a stale index never silently degrades a review; the AI is told to offer a refresh when it's stale.

The index is per repository, not per checkout — a myopic worktree at an MR's head shares its clone's index, so reviewing a new branch never rebuilds it; only the files that branch changed get re-embedded.

A separate clone of the same repo does get its own index, and a repo you delete leaves one behind. Indexing drops such dead copies automatically; to review and reclaim them yourself:

myopic prune            # dry-run: what's stale, and how much it's costing
myopic prune --apply    # delete them

A second clone you still use keeps its index — only unreachable ones are removed.

myopic is a stdio server (no background process), so there's no built-in scheduler — but myopic index /path/to/repo is the hook for one. Point cron or launchd at it to keep an index fresh out of band:

# refresh hourly (incremental — usually seconds)
0 * * * * myopic index /path/to/repo

Override the model/endpoint with MYOPIC_EMBED_MODEL / MYOPIC_OLLAMA_URL.


Configuration reference

Source

Key

Notes

config.toml

[gitlab].url

GitLab base URL (default https://gitlab.com)

config.toml

[gitlab].token

use ${GITLAB_TOKEN} — don't hardcode

.env (next to config)

GITLAB_TOKEN

the actual token value (chmod 600)

env var

MYOPIC_GITLAB_URL / GITLAB_URL

fallback if no TOML

env var

MYOPIC_GITLAB_TOKEN / GITLAB_TOKEN

fallback if no TOML

env var

MYOPIC_CONFIG / MYOPIC_HOME

override the config file / directory

env var

MYOPIC_EMBED_MODEL / MYOPIC_OLLAMA_URL

semantic layer model + endpoint

env var

MYOPIC_AUTO_INDEX

0 to disable auto-indexing during review (default on)

env var

MYOPIC_AUTO_PULL

1 to auto-pull a missing embedding model on first use (default off)

Security

  • One explicit write, everything else read-only. Only mr_post_comments mutates a review, and only when you ask for it — every other tool just reads MR and repo data. The write is never speculative.

  • Your token stays local. It lives in your .env / environment and is sent only to your configured GitLab instance — never to any third party.

  • Auth errors are scrubbed so your token never leaks into error messages.

  • The semantic layer runs entirely locally (your Ollama, an on-disk index) — your code is never sent to a third party.

Development

pip install -e ".[dev]"
pytest                           # hermetic — no network, Ollama, or lancedb needed

License

MIT © Suraj Goyal

mcp-name: io.github.SurajKGoyal/myopic

Available Tools

12 tools
dependency_impactA

Find everywhere a symbol is used in a checked-out repo (the blast radius).

The highest-value review signal: before you approve a change to a function, class, or constant, see who depends on it. Uses ripgrep for fast candidate finding, then classifies each usage via tree-sitter AST as call / import / definition / type_reference. Filesystem-based — point it at a LOCAL clone of the repo the MR belongs to, not the MR URL.

Args: symbol: Function/class/variable name to trace. root: Absolute path to the local repository clone. file_glob: Optional glob to narrow the search (e.g. ".py", "src/**/.ts"). whole_word: Match whole words only (default True). max_results: Cap on references returned (default 50).

Returns: {symbol, root, total_references, references[{file_path, line, context, usage_type}], by_type{...}}

ParametersJSON Schema
NameRequiredDescriptionDefault
rootYes
symbolYes
file_globNo
whole_wordNo
max_resultsNo

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations available, the description carries the full burden of behavioral disclosure. It reveals the underlying mechanism (ripgrep for candidates, tree-sitter AST for classification) and classifies usage types (call/import/definition/type_reference). This is substantive and goes beyond a simple 'find usages', though it does not mention side effects or performance caveats.

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 description is well-structured with clear sections for purpose, usage, params, and returns. It is slightly longer than necessary but every sentence adds value—no filler. The front-loaded purpose sentence ensures immediate comprehension. A 5 would require even tighter phrasing without losing the useful details.

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 5-parameter tool with no output schema and no annotations, this description is highly complete: it explains the input parameters, the return structure, the use case, and the filesystem-based requirement. It lacks only minor edge-case details (e.g., error handling, behavior with no matches), but overall it equips the agent well for correct invocation.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate for the bare schema. It does so excellently with an Args section that explains each parameter including optional behavior (file_glob, whole_word default, max_results cap). The return structure is also documented, providing far more meaning than the schema's property titles alone.

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 opens with a clear, specific verb and resource: 'Find everywhere a symbol is used in a checked-out repo (the blast radius).' It further explains the value for code review, making the tool's purpose unmistakable and distinguishing it from sibling tools like code_search or trace_call_chain.

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?

The description gives clear when-to-use guidance ('before you approve a change... see who depends on it') and an explicit when-not ('point it at a LOCAL clone... not the MR URL'). However, it does not directly compare to alternative sibling tools, or say when another tool would be more appropriate, so it stops short of a 5.

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

index_repoA

Build or incrementally refresh a semantic search index for a local repository.

Walks the repo, chunks every supported-language file by AST boundaries, embeds the chunks via a local Ollama server, and stores them in a per-repo LanceDB table. After the first build this is INCREMENTAL: only files whose content changed since the last run are re-embedded, so refreshing is cheap — run it freely (e.g. when index_status reports "stale"). A changed embedding model or force=True does a full rebuild. Requires a running Ollama (the semantic layer is built in; run myopic doctor to set it up) at MYOPIC_OLLAMA_URL (default http://localhost:11434) with the model pulled (MYOPIC_EMBED_MODEL).

Args: root: Absolute path to the repository to index. force: Rebuild the whole index even if an up-to-date one exists.

Returns: {mode, indexed_chunks, files, skipped, changed_files, deleted_files, git_sha, model} on success, or {"error": "..."} on failure.

ParametersJSON Schema
NameRequiredDescriptionDefault
rootYes
forceNo

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: incremental updates, full rebuild triggers, local Ollama requirement, environment variables, and return format including error handling. It also notes the per-repo LanceDB table, providing a complete picture of side effects and external dependencies.

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?

Although the description is detailed, it is well-structured with clear sections (behavior, prerequisites, args, returns). Every sentence adds value, with no repetition of schema information. It is front-loaded with the primary purpose and uses bullet-like formatting for Args and Returns.

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?

The description covers prerequisites, operational details, parameters, and return values, even without an output schema. It addresses the tool's complexity (incremental vs. full rebuild, external dependencies) and provides all necessary context for an agent to use it correctly.

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

Parameters5/5

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

The input schema has no descriptions for either parameter (0% coverage), but the description compensates fully: 'root: Absolute path to the repository to index' and 'force: Rebuild the whole index even if an up-to-date one exists.' This clarifies both the meaning and the expected values.

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 clearly states the tool's function: 'Build or incrementally refresh a semantic search index for a local repository.' It specifies the resource (local repository), the action (build/refresh index), and the technical approach (AST chunking, Ollama embed, LanceDB storage). This distinguishes it from sibling tools like 'index_status' and 'code_search'.

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?

Provides explicit usage guidance: 'run it freely (e.g. when index_status reports "stale")' and explains when a full rebuild occurs ('changed embedding model or force=True'). It also states prerequisites (Ollama server, model pulled) and references the sibling tool index_status, making the choice of tool clear.

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

index_statusA

Report whether a repo's semantic index is fresh, stale, or absent.

Freshness is keyed to the git commit the index was built from — if HEAD has moved on, the index is "stale" and reports how many commits behind. Check this before leaning on semantic results (code_search / mr_review_context): if state is "stale" or "model_mismatch", offer to index_repo(root) first.

Args: root: Absolute path to the repository.

Returns: {state: absent|fresh|stale|model_mismatch|unknown, root, chunks?, indexed_at?, indexed_sha?, current_sha?, commits_behind?, reason?} or {"error": "..."} if the semantic extra is not installed.

ParametersJSON Schema
NameRequiredDescriptionDefault
rootYes

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it explains freshness is keyed to the git commit, what 'stale' means, and the error condition when the semantic extra is not installed. It does not define 'model_mismatch' or discuss resource implications, which leaves a small transparency gap.

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?

Every sentence earns its place: purpose, freshness semantics, actionable usage guidance, then args and returns. It is front-loaded with the core question and uses clear formatting for skimming.

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?

There is no output schema, but the description lists all return fields (state, root, chunks?, indexed_at?, etc.) and the error form. Combined with usage guidance and error handling, a one-parameter status tool is fully covered.

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 input schema only declares root as a string, so the description's 'Absolute path to the repository' adds meaningful semantics. Since schema coverage is 0%, this compensation is important and mostly sufficient for a single parameter.

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 opens with a specific verb and resource: 'Report whether a repo's semantic index is fresh, stale, or absent.' It clearly distinguishes itself from sibling tools by framing it as a pre-flight check before using code_search or mr_review_context, and contrasts with index_repo which performs the indexing.

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?

The description explicitly says 'Check this before leaning on semantic results (code_search / mr_review_context)' and instructs the agent to 'offer to index_repo(root) first' if state is stale or model_mismatch. This gives direct when-to-use guidance and names the relevant alternatives.

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

mr_changed_filesA

List the files changed in a merge request with stats — no diff content.

The cheap entry point for large reviews: the payload has no diff content, so it stays small even on a very large MR. Each file reports additions/deletions, new/deleted/renamed flags, and a reviewability flag (lockfiles, generated code, binary assets, and enormous single-file changes are marked reviewable=false with a skip_reason). Files are ordered reviewable-first then largest-change-first, so you can batch the highest-value files straight into mr_diff_lines(url, files_filter=[...]).

Args: url: Full GitLab merge request URL.

Returns: {mr_number, title, author, branches, commits, diff_shas, files[{file_path, additions, deletions, reviewable, skip_reason, ...}], stats{total_files, reviewable_files, skipped_files, ...}}

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and meets it: it discloses the output has no diff content, explains the reviewability flag and skip reasons, and specifies file ordering (reviewable-first then largest-change-first). It also provides the return shape.

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?

Description is front-loaded with a one-sentence purpose, then a compact rationale paragraph, then structured Args/Returns. Every sentence adds informational value with no filler.

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?

Given there is no output schema, the description compensates by itemizing the return object and file fields. It fully covers behavior, ordering, and integration with sibling tools, making the tool self-contained for an agent.

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 single parameter (url) receives a one-line semantic clarification ('Full GitLab merge request URL') beyond the bare schema, which is sufficient for a simple string param. It doesn't enumerate URL formats or error conditions, but it's adequate.

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+resource ('List the files changed in a merge request with stats') and immediately contrasts with 'no diff content', differentiating it from sibling diff tools. The final line references mr_diff_lines for further filtering, reinforcing its distinct role.

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?

Explicitly frames it as 'the cheap entry point for large reviews,' defines the payload size advantage, and tells the agent to batch results into mr_diff_lines, giving a concrete when-to-use pattern and alternative.

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

mr_diff_linesA

Fetch a merge request's diff as structured, line-numbered hunks.

Pure data, no LLM. Returns exact file paths, old/new line numbers, and diff content — everything needed to read a change precisely and to compute the diff positions required for inline comments.

Token-safe by construction: on a large MR it returns a bounded page of files and lists the rest under "omitted_files" with "truncated": true (never an oversized payload). Noise files (lockfiles, generated, binary) are listed under "skipped_files", not expanded. For unknown-size MRs, call mr_changed_files first, then batch files_filter here.

Args: url: Full GitLab merge request URL. files_filter: Optional list of file-path fragments to include. Passing this is a TARGETED fetch — noise-skip and the budget are disabled so you get exactly the files you ask for. lines_filter: Optional map of filename-fragment -> target new-file line numbers; returns compact line_mappings instead of full hunks. max_chars: Token-safety budget for the returned diff body (default 80000). Ignored for targeted fetches. skip_noise: Keep lockfiles/generated/binary out of the body (listed under skipped_files). Default True. Ignored when filtering.

Returns: {mr_number, ..., diff_shas, files[...], truncated, omitted_files, skipped_files, stats}

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
max_charsNo
skip_noiseNo
files_filterNo
lines_filterNo

TDQS

A5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses bounded pagination via 'omitted_files' and 'truncated', noise-file handling via 'skipped_files', and default budget behavior for max_chars/skip_noise. This is thorough and non-contradictory.

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 well-structured with a purpose sentence, behavioral guarantees, Args, and Returns. It is detailed but each sentence earns its place, front-loading the core purpose before diving into parameters.

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?

Even without an output schema, it lists the return object fields ({mr_number, ..., diff_shas, files[...], truncated, omitted_files, skipped_files, stats}) and explains the shape of line_mappings when lines_filter is used. This is complete for a complex diff tool.

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

Parameters5/5

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

Schema has 0% description coverage, but the Args section adds rich meaning to all five parameters: url format, files_filter as a targeted-fetch trigger, lines_filter producing compact line_mappings, max_chars as a token-safety budget, and skip_noise for lockfiles/generated/binary.

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?

Description opens with a specific verb and resource: 'Fetch a merge request's diff as structured, line-numbered hunks.' It further clarifies exact file paths, old/new line numbers, and diff content, distinguishing it from sibling tools like mr_diff_sections and mr_changed_files.

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 guidance: 'For unknown-size MRs, call mr_changed_files first, then batch files_filter here.' It also explains when files_filter creates a targeted fetch and when max_chars/skip_noise are ignored, helping the agent choose the right mode.

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

mr_diff_sectionsA

Fetch a merge request's diff grouped by enclosing function/class, not raw hunks.

AST-aware for new files (full tree-sitter chunking) and hunk-context-aware for modified files (declaration pattern + hunk-header hint). All changed lines (add/del) are always included — nothing dropped, only the framing changes. Prefer this over mr_diff_lines on a large MR (many files or a big diff) since grouping by symbol keeps the payload small without truncating mid-function.

Token-safe by construction, same guarantees as mr_diff_lines: on a large MR it returns a bounded page of files and lists the rest under "omitted_files" with "truncated": true. Noise files (lockfiles, generated, binary) are listed under "skipped_files", not expanded. For unknown-size MRs, call mr_changed_files first, then batch files_filter here.

Args: url: Full GitLab merge request URL. include_context_lines: Include unchanged surrounding lines in each section. Default False keeps the payload small. files_filter: Optional list of file-path fragments to include. Passing this is a TARGETED fetch — noise-skip and the budget are disabled so you get exactly the files you ask for. max_chars: Token-safety budget for the returned diff body (default 80000). Ignored for targeted fetches. skip_noise: Keep lockfiles/generated/binary out of the body (listed under skipped_files). Default True. Ignored when filtering.

Returns: {mr_number, title, author, branches, description, commits, diff_shas, files[{file_path, language, new_file, deleted_file, additions, deletions, sections[{symbol, symbol_type, start_line, end_line, changes}]}], truncated, omitted_files, skipped_files, stats}

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
max_charsNo
skip_noiseNo
files_filterNo
include_context_linesNo

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: it explains AST-aware vs hunk-context-aware processing, guarantees that all changed lines are included, and details token-safety mechanics (bounded pages, omitted_files, truncated). It also clarifies how parameters like skip_noise and max_chars are ignored in targeted fetches, adding significant behavioral context.

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 well-structured with clear paragraphs and a compact Args/Returns format. Every sentence adds substantive information—purpose, differentiation, usage guidance, behavior, and parameter semantics—with no filler or redundancy.

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?

Given the tool's complexity (symbol grouping, multiple modes, safety guarantees) and absence of an output schema, the description provides a complete picture: it explains the algorithm, return structure, parameter behaviors, and fallback strategies. It is self-sufficient for an agent to invoke correctly.

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

Parameters5/5

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

The input schema has zero descriptions, but the description's 'Args:' section thoroughly explains each of the 5 parameters, including defaults, edge cases (e.g., files_filter disabling noise-skip), and the meaning of include_context_lines. This fully compensates for the lack of schema descriptions.

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 opens with 'Fetch a merge request's diff grouped by enclosing function/class, not raw hunks,' which is a specific verb+resource+scope statement. It explicitly distinguishes itself from raw hunks and names a sibling tool (mr_diff_lines), making differentiation clear.

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?

It explicitly states when to prefer this tool over mr_diff_lines ('Prefer this over mr_diff_lines on a large MR...') and provides a workflow suggestion: 'For unknown-size MRs, call mr_changed_files first, then batch files_filter here.' It also describes the targeted fetch behavior for files_filter, giving clear use cases and alternatives.

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

mr_post_commentsA

Post inline review comments to a merge/pull request. WRITE — this mutates the review.

The only mutating tool in myopic. Posts each comment one at a time from a queue, immediately visible (no drafts, no bulk-publish), retrying transient failures (HTTP 429/5xx) with exponential backoff — so partial progress survives a failure and self-hosted rate limits are respected. Works on GitLab and GitHub; the backend translates positions. Only call this on the user's explicit request to post — never speculatively.

Get exact line numbers first from mr_diff_lines (its lines_filter maps a source line to the diff position). Each comment needs file_path, body, and at least one of new_line (added/unchanged line) or old_line (removed line).

Args: url: Full merge/pull request URL. comments: List of {file_path, body, new_line?, old_line?, old_path?}. max_comments: Safety cap per call (default 25); split larger batches.

Returns: {url, platform, total, posted, failed, published, publish_error, details[{file_path, line, status, error}]} or {"error": "..."}.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
commentsYes
max_commentsNo

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: it mutates state, posts one comment at a time from a queue, has no drafts/bulk-publish, retries transient failures with exponential backoff, and handles partial progress. It also states cross-platform behavior for GitLab and GitHub, providing crucial operational context.

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 long but every sentence adds value: behavioral notes, usage restrictions, prerequisites, parameter semantics, and return shape are all included without redundancy. The structured Args/Returns layout improves scannability.

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?

The tool has no output schema, so the description compensates by providing a full return value breakdown. It also covers error output, batching guidance, and failure semantics, making the description complete enough for an agent to confidently select and invoke the tool.

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

Parameters5/5

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

Even though the input schema has 0% description coverage, the description's Args section explains each parameter in detail: url is the full merge/pull request URL, comments is a list of objects with optional fields, and max_comments is a safety cap. It also clarifies which comment fields are required or optional.

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 begins with a specific verb and resource: 'Post inline review comments to a merge/pull request.' It also explicitly flags the write nature ('WRITE — this mutates the review'), which clearly distinguishes it from read-only siblings like mr_diff_lines and mr_verify_review.

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?

The description gives explicit guidance: 'Only call this on the user's explicit request to post — never speculatively.' It also tells the agent to first get line numbers from mr_diff_lines, naming the prerequisite sibling tool and explaining how lines_filter maps source lines to diff positions.

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

mr_review_contextA

Graph-first review context: dependency impact per changed symbol, plus optional semantic enrichment.

Extracts the top-N most-frequent identifiers from the MR diff, then for each:

  1. Runs dependency_impact(symbol, root) — always, no optional extras needed.

  2. If the repo has been indexed via index_repo(root), enriches each symbol with related_patterns from a hybrid semantic search against the codebase.

The semantic layer is purely additive: a result with semantic_available=false is complete and actionable — dependency impact already covers the blast radius. Use this as a single-call alternative to running dependency_impact separately for each changed symbol.

Args: url: Full GitLab merge request URL. root: Absolute path to the local repository clone. max_symbols: Maximum changed symbols to analyze (default 8).

Returns: {mr_number, symbols[{symbol, impact, related_patterns?}], symbol_source, semantic_available, root_status?, warning?, index_status?} or {"error": "..."}. A "warning" means root isn't checked out to the MR — set it up with myopic worktree <url> <repo> and re-run against its path.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
rootYes
max_symbolsNo

TDQS

A5/5.0
Behavior5/5

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

The description fully discloses behavior: it extracts top-N identifiers, always runs dependency_impact, and optionally enriches if the repo was indexed. It explicitly states the semantic layer is additive and that a result with semantic_available=false is complete and actionable. It also discloses the warning condition for root not checked out and how to resolve it. With no annotations, the description carries the full transparency burden and excels.

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 well-structured: a concise summary sentence, a bulleted process list, a clean Args section, and a Returns section. Every sentence adds value—no filler. It is appropriately sized for the tool's complexity and front-loads the core purpose.

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?

Given the lack of annotations and output schema, the description is remarkably complete. It covers the input parameters, the processing logic, dependencies on index_repo, the return format (including error/warning fields), and even setup guidance. No gaps are apparent for an agent to select and invoke the tool correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does. It explains each parameter: url (Full GitLab merge request URL), root (Absolute path to local repository clone), max_symbols (Maximum changed symbols to analyze, default 8). This adds meaning beyond the bare schema.

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 clearly states the tool's specific function: 'Graph-first review context: dependency impact per changed symbol, plus optional semantic enrichment.' It uses a specific verb ('runs dependency_impact') and resource (MR diff symbols), and distinguishes from siblings by positioning it as a single-call alternative to running dependency_impact per symbol.

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?

Explicitly says when to use it: 'Use this as a single-call alternative to running dependency_impact separately for each changed symbol.' Also provides a precondition (requires root checked out to MR) and a remedy ('set it up with myopic worktree' and re-run). This is clear guidance on when and how to use the tool.

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

mr_review_statusA

Get a merge request's review status: metadata + discussions + resolution.

Pure data, no LLM. Collapses several platform API calls into one snapshot of where the review stands — every discussion thread, what's resolved vs open, general comments, and a lightweight file-change summary. Start here to orient before diving into the diff.

Args: url: Full GitLab merge request URL.

Returns: {mr_number, title, author, branches, state, merge_status, commits, general_comments, discussions[...], summary{resolved, unresolved, ...}, files_changed[...], stats}

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It states 'Pure data, no LLM' and 'Collapses several platform API calls into one snapshot,' disclosing that it is a read-only aggregator. It also details the return structure, but omits potential performance implications or error behavior, so a 4 is appropriate.

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 concise and well-structured. It opens with a clear purpose sentence, adds key differentiators, then presents args and returns in a scannable format. No unnecessary words or redundancy.

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 single-parameter read-only tool with no output schema, the description is quite complete. It lists all return fields, notes the aggregated nature, and provides usage context. It could mention auth requirements or failure scenarios, but these are probably less critical for this tool type.

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

Parameters5/5

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

The schema lists a single 'url' parameter with no description, and schema coverage is 0%. The description fully compensates by defining it as a 'Full GitLab merge request URL,' which clarifies the expected input beyond the schema's bare type definition.

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 states the tool gets a merge request's review status, specifically metadata, discussions, and resolution. It also distinguishes from siblings by describing it as a single snapshot that collapses several API calls, making it clear this is an overview tool rather than a diff-focused one.

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?

The directive 'Start here to orient before diving into the diff' provides clear usage context, suggesting this is the first tool to use when reviewing a merge request. However, it does not explicitly name alternatives or state when not to use it, stopping short of a 5.

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

mr_verify_reviewA

Check whether each review thread was addressed by nearby diff changes.

Joins the review's discussions with its current diff: for every inline comment thread, surfaces the add/del lines within +/-window of the commented line. A thread with no nearby changes is a candidate for "not yet addressed"; one with changes shows exactly what moved near it — a fast re-review pass without re-reading the whole diff. Read-only. Works on GitLab and GitHub (note: GitHub doesn't expose thread resolution via REST, so rely on has_changes there, not the resolved flag).

Args: url: Full merge/pull request URL. window: Lines before/after the commented line to scan (default 40).

Returns: {mr_number, title, summary{total_threads, resolved, unresolved, threads_with_changes, threads_without_changes}, threads[{..., nearby_changes, has_changes}], threads_no_location[...]}

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
windowNo

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full transparency burden. It discloses read-only behavior, explains the join logic, defines the notion of 'addressed', and details the GitHub limitation regarding thread resolution. This is exemplary behavioral disclosure.

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 well-structured and front-loaded with the purpose. Each section (purpose, args, returns) earns its place. The returns block is detailed but necessary given the absence of an output schema, so there is no waste.

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?

For a tool with two parameters, no annotations, and no output schema, the description is fully complete. It explains the algorithm, the return structure, platform differences, and the intended use case, leaving no meaningful gaps.

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

Parameters5/5

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

The input schema has 0% description coverage, but the description fully documents both parameters: url as 'Full merge/pull request URL' and window as 'Lines before/after the commented line to scan (default 40).' This adds complete meaning beyond the bare schema names.

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 opens with a specific verb+resource: 'Check whether each review thread was addressed by nearby diff changes.' This clearly distinguishes the tool from siblings like mr_review_status or mr_diff_lines by focusing on verification of thread resolution against diff context.

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?

The description provides clear usage context: 'a fast re-review pass without re-reading the whole diff.' It also notes a platform-specific caveat for GitHub. However, it does not explicitly name alternatives or state when not to use this tool, so it falls short of a 5.

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

trace_call_chainA

Trace a function's callers and callees across a checked-out repo (AST).

Complements dependency_impact: where dependency_impact lists every reference, this builds the directed call graph — where the symbol is defined, what it calls, and what calls it — so you can reason about a change's ripple effects. Tree-sitter-based; point it at a LOCAL clone of the repo.

Args: symbol: Function or class name to trace. root: Absolute path to the local repository clone. language: Restrict to one language; auto-detects if omitted. max_depth: Levels of callers/callees to follow (default 1).

Returns: {symbol, definition{file_path, line, type}, callees[...], callers[...], stats{files_scanned, parse_errors}}

ParametersJSON Schema
NameRequiredDescriptionDefault
rootYes
symbolYes
languageNo
max_depthNo

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well by disclosing the AST/Tree-sitter approach, local-repo requirement, and returning parse_errors stats. However, it does not explicitly state whether the tool is read-only or mention limitations like language support coverage, which prevents a perfect score.

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 well-structured with a purpose statement, a comparative paragraph, and clearly separated Args and Returns sections. It is appropriately sized for a tool with four parameters and a structured return value, with no wasted words.

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?

The description is complete for its complexity: it provides the tool's purpose, a contrast with siblings, all parameter semantics, and an explicit return format. Because there is no output schema, the detailed return object fills the gap and makes the tool's behavior predictable.

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

Parameters5/5

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

Schema coverage is 0%, so the description fully compensates. It defines symbol as a function/class name, root as an absolute path, language as an optional restriction with auto-detection, and max_depth as the number of caller/callee levels with a default of 1. This is exactly what an agent needs.

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 opens with a specific verb+resource+method: 'Trace a function's callers and callees across a checked-out repo (AST)'. It also explicitly contrasts with dependency_impact, stating that dependency_impact lists references while this tool builds a directed call graph, making the purpose unmistakable.

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?

The description names dependency_impact as a complementary alternative and clarifies when to use this tool: 'to reason about a change's ripple effects'. It also states a key prerequisite ('point it at a LOCAL clone'), which is practical usage guidance.

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. Dates show when Glama detected each change.

  1. 12 tool updatesv0.1.10
    • First observedcode_search
    • First observeddependency_impact
    • First observedindex_repo
    • First observedindex_status
    • First observedmr_changed_files
    • First observedmr_diff_lines
    • First observedmr_diff_sections
    • First observedmr_post_comments
    • First observedmr_review_context
    • First observedmr_review_status
    • First observedmr_verify_review
    • First observedtrace_call_chain

TDQS

A4.7/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose: MR summary, raw diff vs. sectioned diff, review status, thread verification, comment posting, and separate local analysis tools (dependency_impact, trace_call_chain, code_search). Even the two diff tools are explicitly differentiated by structured sections vs. raw hunks, with guidance on when to prefer each.

Naming Consistency4/5

Tool names are mostly predictable: MR-related tools share the `mr_` prefix, and indexing tools share `index_`. However, the underlying verb/noun pattern is not fully uniform (e.g., `code_search` vs. `index_repo`, `mr_diff_sections` vs. `mr_verify_review`), though all names are descriptive and support quick recognition.

Tool Count5/5

12 tools is well-scoped for a code review assistant. Each tool covers a distinct step: changed-file summary, diff variants, review status, verification, posting, and local repository analysis (dependency, call graph, semantic search). No tool feels redundant or missing.

Completeness5/5

The tool set covers the full MR review lifecycle—orient (mr_changed_files, mr_review_status), inspect (mr_diff_lines, mr_diff_sections), analyze impact (dependency_impact, trace_call_chain, mr_review_context), verify threads (mr_verify_review), and act (mr_post_comments). Local indexing and search tools round out the surface, leaving no obvious dead ends.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SurajKGoyal/myopic'

If you have feedback or need assistance with the MCP directory API, please join our Discord server