Skip to main content
Glama
RudrenduPaul

NeuronScope MCP Server

patch

Verify if a flagged transformer component causally drives a prediction by zero-ablating it in one forward pass and comparing output token changes.

Instructions

Zero-ablate one component (a single transformer block's layer plus a component type such as an attention output or MLP output) in an open-weight TransformerLens model's forward pass, and report how the predicted token and its logit changed relative to the unablated baseline. This is a minimal causal intervention: use it to test whether a component trace or circuit flagged as correlated with a prediction is actually causally responsible for it. Call it after trace or circuit has surfaced a candidate layer/component; it does not search for candidates itself. Read-only in the sense that it writes no files and the ablation only affects that single in-memory forward pass, nothing persists across calls; the same HuggingFace model-weight caching and CPU-by-default notes as trace apply. Deterministic for a given model, prompt, layer, and component. On failure it returns a structured error object instead of raising: an out-of-range layer raises LayerOutOfRangeError, an unsupported model name raises UnsupportedModelError, and a prompt exceeding the context window raises PromptTooLongError, all surfaced the same way. Parameters: model (str); prompt (str); layer (int), the zero-indexed transformer block to patch; component (str), one of resid_pre, resid_mid, resid_post, attn_out, mlp_out, mlp_post. Example call: model='gpt2', prompt='The capital of France is Paris. The capital of Japan is', layer=9, component='attn_out'. Returns JSON with schema_version, operation, model, prompt, layer, component, ablation_type ('zero'), baseline_predicted_token, baseline_predicted_token_id, baseline_top_logit, patched_predicted_token, patched_predicted_token_id, patched_top_logit, logit_delta, and prediction_changed (bool).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerYes
modelYes
promptYes
componentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: read-only in-memory effect, no persistence, determinism, failure modes returning structured errors, and dependency on trace's caching/CPU defaults. It also clarifies what 'read-only' means, which is critical for a tool named 'patch.'

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?

Though long, the description is dense and logically organized: purpose, usage context, behavioral guarantees, error handling, parameters, example, and return fields. Given the tool's complexity and lack of annotations, every sentence serves a purpose and the key information is front-loaded.

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 purpose, usage, safety, error behavior, parameter semantics, and output shape. It also references sibling tools appropriately. Even with an output schema present, the description adds essential context about causal intervention, determinism, and failure handling.

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%, but the description defines every parameter: model as str, prompt as str, layer as zero-indexed transformer block, and component with its full enum of allowed values. An example call grounds the semantics concretely.

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: 'Zero-ablate one component ... and report how the predicted token and its logit changed.' It clearly distinguishes from siblings by stating it does not search for candidates itself, and explicitly frames it as a causal intervention after trace/circuit.

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?

Explicit guidance is provided: 'use it to test whether a component trace or circuit flagged as correlated ... is actually causally responsible,' and 'Call it after trace or circuit has surfaced a candidate layer/component; it does not search for candidates itself.' This gives clear when-to-use and relationship to alternatives.

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

Install Server

Other Tools

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/RudrenduPaul/NeuronScope'

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