Skip to main content
Glama

markdown_to_script

Extract tagged code blocks from a Markdown file into a script, optionally converting prose to comments or including all fenced blocks.

Instructions

Extract code from a markdown file. Only fenced blocks tagged with language are kept unless extract_all_blocks is true. Prose becomes comments when include_prose is true.

Input Schema

NameRequiredDescriptionDefault
pathYes
languageYes
output_pathNo
include_proseNo
extract_all_blocksNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.5/5.0
Behavior3/5

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

The description usefully discloses the filtering rules beyond annotations: only fenced blocks tagged with `language` are kept unless `extract_all_blocks` is true, and prose becomes comments when `include_prose` is true. However, annotations already flag this as non-read-only, non-idempotent, and the description never says what is written where, whether an existing file is overwritten, or whether output goes to stdout.

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?

Three tight sentences with the core action front-loaded and the conditional flag semantics following. No filler, and each sentence carries distinct information.

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?

An output schema exists, so return values need not be described. Combined with the flag semantics explained, the remaining unknown — the meaning of `output_path` — is the only real gap, and it is a minor one against the description's otherwise sufficient coverage of the extraction behavior.

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 0% — the schema carries only titles — so the description must compensate. It clarifies semantics for `language`, `include_prose`, and `extract_all_blocks`, but `path` and especially `output_path` (the parameter that determines whether a file is created) receive no explanation at all, and no accepted language values are listed.

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?

States a specific verb and resource: extract code from a markdown file. An agent can tell it apart from file-reading siblings, though the obvious inverse tool `script_to_markdown` in the sibling list is never acknowledged, so the direction of the transform must be inferred from the name alone.

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

Usage Guidelines2/5

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

There is no when-to-use / when-not-to-use guidance and no mention of alternatives (e.g., `read_text_file` for raw content, `script_to_markdown` for the reverse). The sentences that follow describe flag behavior rather than selection criteria, leaving routing entirely to the agent.

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