Skip to main content
Glama

convert_markdown

Convert Markdown strings to styled PDF files with selectable light or high-contrast themes and a specified output path.

Instructions

Convert a Markdown string to a styled PDF file.

Args:
    markdown: The Markdown content to convert.
    output_path: Where to write the PDF. ".pdf" is appended if missing. Relative paths
        resolve against the server's working directory, so pass an absolute path.
    theme: "light" (default) or "high-contrast". Changes code-block, quote, and table colors.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "markdown": "<markdown>",
      "output_path": "<output_path>"
    },
    "name": "convert_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
themeNolight
markdownYes
output_pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose some real behavior: '.pdf' is appended to the path, relative paths resolve against the server's working directory, and light is the default theme. It does not say whether an existing file is overwritten, whether missing parent directories are created, or whether the operation requires any filesystem permissions. For a write-to-disk tool with zero annotations, those omissions matter.

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?

The purpose sentence is front-loaded and the Args block is a clean, scannable listing with no filler. The path-resolution sentence is slightly long but each clause conveys operational detail, and nothing is redundant with the schema.

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 the description correctly avoids explaining return values, and the three parameters are well covered. What is missing is the mutation contract for a filesystem-writing tool: overwrite semantics, directory creation, and failure modes. Those gaps leave the description merely adequate for the tool's complexity.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry all parameter meaning, and it does: markdown is the content, output_path gets the '.pdf' suffix and relative-path resolution behavior spelled out (with an explicit recommendation to pass an absolute path), and theme gets its default and the concrete visual elements it changes. This is meaning an agent cannot recover from the bare schema.

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 opens with a specific verb and resource pair: 'Convert a Markdown string to a styled PDF file.' That is unambiguous about input format and output artifact. There are no sibling tools to differentiate from, so the only reason this falls short of 5 is the absence of any scope note (e.g. size limits, supported Markdown features).

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?

The description never says when to reach for this tool or when not to. It offers no preconditions, no mention of what to do if the target file already exists, and no guidance on choosing between the two themes beyond listing them. The caller is left to infer intent from the function name alone.

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

Deploy Server

Other Tools