Skip to main content
Glama
Majrooo

majrooo-mcp-devkit

by Majrooo

extract_code_block

Extract full functions, structs, classes, or methods from a file with exact line ranges and content, including annotations, using bracket matching that ignores braces in strings and comments.

Instructions

Read the full text of a function, struct, class, or method from a file. Returns precise line range + content. Includes leading annotations (#[derive], @decorator, /// doc comments). String/comment-aware bracket matching prevents false depth counts from braces inside strings or comments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for resolving relative file paths (default: primary project root)
fileYesSource file path (absolute or relative to cwd)
symbolYesSymbol name to extract
contextLinesNoExtra lines before/after the block (default: 0)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.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 transparency burden and does well by disclosing that it returns line ranges and content, includes leading annotations, and uses string/comment-aware bracket matching. 'Read' also indicates a non-mutating operation. It does not discuss error cases, but this is not a critical gap for a read tool.

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 short and front-loaded. The first sentence states purpose; subsequent sentences add distinct value about return format, annotation inclusion, and brace-matching robustness. No wasted words.

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?

The description is sufficient for a read-only extraction tool with a well-formed schema: it names the target constructs, output shape, and a key edge-case behavior. It stops short of describing output JSON structure or error handling, but no output schema is promised and the essentials are present.

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 description coverage is 100%, so the baseline is 3. The description adds useful context about what the tool extracts but does not explain parameter syntax or behavior beyond what the schema already covers.

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 clearly states the verb ('Read'), the resource ('function, struct, class, or method from a file'), and the return behavior ('precise line range + content'). It is recognizable as distinct from siblings like split_file_by_declarations, though it does not explicitly name or contrast them.

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?

The intended use is implied: extract the full text of a named code construct. However, the description gives no explicit guidance on when to prefer this over closely related siblings such as split_file_by_declarations or universal_find_references, and it does not state exclusions.

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

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/Majrooo/majrooo-mcp-devkit'

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