Skip to main content
Glama

convert_to_rtf

Idempotent

Convert Markdown to Rich Text Format (RTF) for legacy word processors and email clients. Preserves bold, italic, headers, lists, and code blocks. Returns string or saves to file.

Instructions

Convert Markdown to Rich Text Format (RTF). Produces an RTF document string preserving basic formatting: bold, italic, headers (as styled paragraphs), lists, and code blocks. Side effects: when output_path is provided, writes the RTF file to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the raw RTF markup as a string. Returns: RTF markup string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when the target application requires RTF (e.g. legacy word processors, email clients). Prefer convert_to_docx for modern Word documents, or convert_to_html for web display.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markdownYesThe raw Markdown source text to convert. Supports GitHub-Flavored Markdown (tables, task lists, strikethrough) and KaTeX math expressions. Pass the full document content as a string, not a file path.
output_pathNoOptional. Absolute or relative file path (e.g. './output.txt') where the result will be saved. Parent directories are created automatically. If omitted, the converted text content is returned directly in the response as a string. If provided, the file is written to disk and a JSON summary with { success, file_path, file_size_bytes, format } is returned instead.
Behavior5/5

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

Substantially exceeds annotations by detailing: (1) transformation behavior (preserves specific formatting types), (2) filesystem side effects (creates parent directories, overwrites existing files), and (3) bimodal return behavior (string vs JSON structure). Acts as complete behavioral spec.

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?

Six distinct sentences each serving unique purposes: conversion scope, side effects, conditional return #1, conditional return #2, usage guidance, alternatives. No redundancy; information density is high with no filler.

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?

For a conversion utility with rich annotations and no output schema, description achieves completeness by documenting return structures, error-adjacent behaviors (directory creation, overwrites), target applications, and comparative tool selection. No gaps remain for agent invocation.

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

Parameters4/5

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

While schema has 100% coverage, description adds critical semantic context linking output_path presence/absence to distinct return types (RTF string vs JSON object) and side effects, clarifying the parameter's role as a mode switch beyond simple file path semantics.

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?

Description opens with specific verb-resource pair ('Convert Markdown to Rich Text Format') and immediately distinguishes scope with formatting details (bold, italic, headers, lists, code blocks). Naming convention and sibling differentiation are clear from the explicit RTF focus.

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

Usage Guidelines5/5

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

Provides explicit when-to-use clause targeting 'legacy word processors, email clients' and names specific sibling alternatives ('Prefer convert_to_docx for modern Word documents, or convert_to_html for web display'), giving the agent clear decision criteria.

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/XJTLUmedia/MCP_Markdown_Formatter'

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