Skip to main content
Glama

find_code_blocks

Extract and filter code blocks from markdown files by programming language to analyze documentation content.

Instructions

Find all fenced code blocks in a markdown file. Optionally filter by language (e.g. typescript, python).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the markdown file
languageNoOptional: filter by language (e.g. typescript, python)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'find all' and optional filtering, but doesn't disclose behavioral traits like what happens if the file doesn't exist, how errors are handled, whether it's read-only (implied but not stated), or the format of returned results. For a tool with no annotation coverage, this leaves significant gaps.

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?

Two concise sentences with zero waste: the first states the core purpose, the second adds the optional filter detail. It's appropriately sized and front-loaded with essential information.

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?

Given 2 parameters with full schema coverage and no output schema, the description is adequate but incomplete. It covers the basic purpose and optional filtering, but lacks details on error handling, result format, or behavioral constraints that would be helpful for an agent. No annotations exist to compensate, making this minimally viable.

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 schema already documents both parameters (file path and optional language filter). The description adds minimal value by restating the optional language filter with examples, but doesn't provide additional semantics beyond what's in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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 'find' and resource 'fenced code blocks in a markdown file', with specific mention of filtering by language. It distinguishes from siblings like get_frontmatter or list_headings by focusing on code blocks, but doesn't explicitly contrast with search_docs which might have overlapping functionality.

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 description implies usage for markdown files with code blocks and mentions optional language filtering, but doesn't explicitly state when to use this tool versus alternatives like search_docs or get_section. No guidance on prerequisites or exclusions is provided.

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/ofershap/mcp-server-markdown'

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