Skip to main content
Glama

read_converted_markdown

Access converted markdown content from Office documents for processing or analysis after conversion.

Instructions

Read the content of a previously converted markdown file.

Use this after convert_document to get the actual markdown content. This is useful when you want to process or analyze the converted document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markdown_pathYesPath to the markdown file (returned by convert_document)

Implementation Reference

  • Handler for 'read_converted_markdown' tool: validates input path, checks file existence, reads the markdown file content, and returns it as TextContent with metadata.
    elif name == "read_converted_markdown":
        markdown_path = arguments.get("markdown_path")
        if not markdown_path:
            return [TextContent(
                type="text",
                text=f"{cache_notice}\n\n" + json.dumps({"error": "markdown_path is required"}, ensure_ascii=False)
            )]
    
        path = Path(markdown_path)
        if not path.exists():
            return [TextContent(
                type="text",
                text=f"{cache_notice}\n\n" + json.dumps({"error": f"File not found: {markdown_path}"}, ensure_ascii=False)
            )]
    
        with open(path, "r", encoding="utf-8") as f:
            content = f.read()
    
        return [TextContent(
            type="text",
            text=f"{cache_notice}\n[Reading] {markdown_path}\n[Length] {len(content)} characters\n\n---\n\n{content}"
        )]
  • Input schema definition for the 'read_converted_markdown' tool, specifying the required 'markdown_path' parameter.
    inputSchema={
        "type": "object",
        "properties": {
            "markdown_path": {
                "type": "string",
                "description": "Path to the markdown file (returned by convert_document)",
            },
        },
        "required": ["markdown_path"],
    },
  • Registration of the 'read_converted_markdown' tool in the list_tools() function.
            Tool(
                name="read_converted_markdown",
                description="""Read the content of a previously converted markdown file.
    
    Use this after convert_document to get the actual markdown content.
    This is useful when you want to process or analyze the converted document.""",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "markdown_path": {
                            "type": "string",
                            "description": "Path to the markdown file (returned by convert_document)",
                        },
                    },
                    "required": ["markdown_path"],
                },
            ),
            Tool(
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the tool's behavior as reading content from a file, which is straightforward. However, it doesn't disclose potential behavioral traits like error handling (e.g., if the file doesn't exist), performance considerations, or output format details. The description adds some context but lacks depth for a tool with no annotation coverage.

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?

The description is concise and well-structured with three sentences that each serve a clear purpose: stating the tool's function, providing usage guidelines, and explaining its utility. There is no wasted text, and it's front-loaded with the core purpose.

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?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is adequate but has gaps. It explains the purpose and usage well but lacks details on behavioral aspects like error handling or output format. For a read operation with no structured output information, more context on what 'content' entails would improve completeness.

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?

The input schema has 100% description coverage, with 'markdown_path' clearly documented as 'Path to the markdown file (returned by convert_document).' The description adds minimal value beyond this, only implying the parameter's purpose through context. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 clearly states the tool's purpose: 'Read the content of a previously converted markdown file.' It specifies the verb ('read') and resource ('converted markdown file'), making it easy to understand. However, it doesn't explicitly differentiate from siblings like 'get_document_metadata' or 'list_conversions' beyond mentioning 'convert_document'.

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?

The description provides explicit guidance on when to use this tool: 'Use this after convert_document to get the actual markdown content.' It also clarifies the context: 'This is useful when you want to process or analyze the converted document.' This clearly distinguishes it from alternatives and specifies prerequisites.

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/Asunainlove/OfficeReader-MCP'

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