Skip to main content
Glama

script_to_markdown

Convert scripts into literate Markdown by turning comment blocks into prose and code into fenced blocks. Use it to generate readable documentation from source files.

Instructions

Convert a script into literate markdown: column-0 comment blocks (and PowerShell <# #> blocks) become prose, everything else becomes fenced code. Heuristic and meant for documentation; markdown_to_script reverses it.

Input Schema

NameRequiredDescriptionDefault
pathYes
languageNo
output_pathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=false, so safety is partly covered. The description adds genuinely useful context by admitting the conversion is 'heuristic', warning that output is approximate. However, it never says whether the tool writes a file or returns markdown, nor how the optional output path affects mutation, which matters given readOnlyHint=false.

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 sentences, no filler, and the transformation rule is front-loaded before the sibling reference. Every clause adds information the agent could not get from the schema or annotations.

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?

An output schema exists, so return shape need not be explained, and the conversion semantics are well covered. But for a non-read-only tool with an optional output path, the description leaves the write-vs-return behavior and the role of 'language' undefined, which is a meaningful gap for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for three parameters, so the description carries the full burden and does not meet it: 'path', 'language', and especially 'output_path' are never mentioned. The PowerShell mention faintly implies language-aware comment detection, but an agent gets no guidance on what language does or whether output_path causes a write.

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 and transformation ('Convert a script into literate markdown') and then defines the exact rule set: column-0 comment blocks and PowerShell <# #> blocks become prose, everything else becomes fenced code. It explicitly names the inverse sibling markdown_to_script, so an agent can distinguish direction of conversion without opening either schema.

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?

'Heuristic and meant for documentation' gives the intended context for choosing this tool, and 'markdown_to_script reverses it' names the alternative for the opposite direction. What is missing is an explicit when-not (e.g., do not use on non-script files or when you need lossless round-tripping), so it stops short of a full routing rule.

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