Skip to main content
Glama

script_to_markdown

Converts scripts into literate Markdown documentation: comment blocks become prose, and remaining code becomes fenced code blocks.

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.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations, so the description carries the full burden. It usefully discloses that the conversion is heuristic (i.e. lossy/imperfect) and spells out the comment-vs-code rule, which is real behavioral value. It says nothing about whether output_path writes to disk or overwrites an existing file, or what happens to encoding/BOM, which matters for a file-touching tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with the core behavior front-loaded and no filler; the PowerShell <# #> parenthetical and the reversal note each add information. Minor cost: the middle clause is a dense run-on.

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 values need not be explained, and the transformation semantics are well covered. However, for a three-parameter file-writing tool with zero schema documentation and no annotations, the description leaves the output_path/language behavior entirely unexplained.

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% — all three parameters (path, language, output_path) are bare titles with no descriptions. The description never mentions any parameter, so it fails to clarify the most consequential ambiguity: whether output_path causes a file to be written or the markdown is returned. Only the implicit 'script' wording hints at what path is.

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 — 'Convert a script into literate markdown' — and even explains the transformation rule (column-0 comments and PowerShell <# #> blocks become prose, the rest becomes fenced code). It names its inverse sibling markdown_to_script, but does not distinguish itself from pandoc_convert, which also converts formats.

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?

'Heuristic and meant for documentation' implies the intended context, and naming markdown_to_script as the reversal hints at the round-trip use case. There is no explicit when-not guidance or routing advice versus pandoc_convert, so usage must be inferred.

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