Skip to main content
Glama
TonyPansera

merlin-perceval-mcp

by TonyPansera

get_source

Read real source code from MerLin or Perceval to resolve ambiguous documentation. Provide a dotted symbol for a class/function or a module name for the full module.

Instructions

Read the library's real source code.

Given a dotted symbol the result is narrowed to that class or function; given a module name the whole module is returned. Use this when the documented behaviour is ambiguous and you need to see what the code does.

Args: target: dotted symbol or module, e.g. "merlin.core.circuit" or "QuantumLayer". library: "merlin" (default) or "perceval". ref: git ref to read; defaults to the repository's default branch. offset: character offset to start from. limit: maximum characters to return.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
limitNo
offsetNo
targetYes
libraryNomerlin

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

There are no annotations, so the description carries the full burden. It discloses useful behavior (symbol vs module narrowing, offset/limit paging), but omits read-only framing, truncation/output-size behavior (limit defaults to 40000), error cases, and whether it hits a network or cached source. Adds real context but leaves behavioral gaps.

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?

Front-loads the purpose in the first line, then a precise behavioral sentence, then a clean Args block. Every element earns its place; only the retained Args indentation styling is slightly less tight than prose.

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?

An output schema exists, so return values need not be explained. Combined with the documented parameters and targeting behavior, the definition is nearly complete, though a note on truncation limits/read-only guarantees would close the remaining gap.

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 documents all five parameters (target, library, ref, offset, limit) with meaning and concrete examples (e.g. "merlin.core.circuit" or "QuantumLayer") that the bare schema lacks.

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 ("Read the library's real source code") and immediately clarifies the two targeting modes: a dotted symbol narrows to a class/function, a module name returns the whole module. This clearly distinguishes it from doc-oriented siblings like search_docs, get_doc_page, and get_api_doc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear triggering condition: "Use this when the documented behaviour is ambiguous and you need to see what the code does." It does not explicitly name the alternative tools or state when NOT to use it, so it falls short of a full 5, but the context is unambiguous.

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