Skip to main content
Glama

convert_with_metadata

Convert a file or URL to Markdown and return both content and structured metadata.
Metadata includes title, estimated token counts for all major models, word count,
character count, and reading time.

Args:
    source: Either a URL (starting with http/https) or absolute file path
    source_type: Either "url" or "file". Default: "url"

Returns:
    Markdown content with a metadata header block containing all stats

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
source_typeNourl

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.4/5.0
Behavior4/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 transparently describes the return format, including a metadata header with token counts, word count, character count, and reading time. However, it does not disclose potential side effects (e.g., network calls for URLs) or failure conditions, which is a minor gap.

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 well-structured with Args and Returns sections, each sentence providing essential information without redundancy. It is appropriately concise and easy to parse.

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?

Given the simple tool complexity (2 parameters) and the existence of an output schema, the description covers input semantics, output format, and key metadata details. It is complete for an agent to select and invoke the tool correctly.

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?

The description fully explains both parameters beyond the input schema. 'source' is clarified as either a URL starting with http/https or an absolute file path, and 'source_type' is specified with exact allowed values and its default. This compensates for the 0% schema description coverage.

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?

The description clearly states a specific verb ('convert') and resource ('file or URL') with a defined outcome ('Markdown and structured metadata'). This differentiates it from sibling tools by emphasizing the metadata aspect, which is unique.

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?

The description implies usage for cases where both content and metadata are needed but does not explicitly name alternatives or when not to use this tool. Siblings like convert_url and convert_file are not mentioned, so guidance is implicit rather than explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.2/5.0
Disambiguation2/5

Several tools overlap: convert_url already supports ArXiv and YouTube, making convert_arxiv and convert_youtube redundant. convert_with_metadata duplicates convert_file/convert_url but adds a metadata header. Agents must read descriptions carefully to choose correctly.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern: convert_*, count_tokens, list_supported_formats, prepare_for_rag. No mixed conventions or vague verbs exist.

Tool Count5/5

9 tools is well-scoped for a document conversion service. Each tool has a distinct role (file, URL, batch, metadata, token counting, format listing, RAG preparation) without being bloated.

Completeness5/5

The domain of converting sources to Markdown is thoroughly covered: files, URLs, batch conversion, metadata, token counting, and RAG chunking. The only minor redundancy is the specialized source converters, but the core workflow is complete.

Resources