Skip to main content
Glama

markdown

Convert web page URLs into clean, structured markdown format for content extraction and documentation purposes.

Instructions

Convert a URL to clean markdown. Costs 2 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to convert to markdown

Implementation Reference

  • The handler function for the markdown tool - takes a URL parameter and calls the API POST /markdown endpoint, wrapping the result with jsonResult
    async ({ url }) => jsonResult(await apiPost("/markdown", { url }))
  • src/index.ts:125-130 (registration)
    Registration of the markdown tool with the MCP server using server.tool() - defines name, description, schema, and handler
    server.tool(
      "markdown",
      "Convert a URL to clean markdown. Costs 2 credits.",
      { url: z.string().describe("URL to convert to markdown") },
      async ({ url }) => jsonResult(await apiPost("/markdown", { url }))
    );
  • Input schema definition for markdown tool - requires a url parameter as a string with description
    { url: z.string().describe("URL to convert to markdown") },
  • Helper function apiPost that makes POST requests to the SearchClaw API - handles headers, JSON body, timeout, and error responses
    async function apiPost(path: string, body: Record<string, unknown>) {
      const controller = new AbortController();
      const timeout = setTimeout(() => controller.abort(), 30000);
      try {
        const response = await fetch(`${API_BASE}${path}`, {
          method: "POST",
          headers: { ...headers, "Content-Type": "application/json" },
          body: JSON.stringify(body),
          signal: controller.signal,
        });
        if (!response.ok) {
          const text = await response.text();
          throw new Error(`SearchClaw API error ${response.status}: ${text}`);
        }
        return response.json();
      } finally {
        clearTimeout(timeout);
      }
    }
  • Helper function jsonResult that formats API responses into MCP content format - converts data to JSON string with formatting
    function jsonResult(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It successfully communicates the cost implication ('Costs 2 credits'), which is valuable behavioral information. However, it doesn't describe other important behavioral aspects like rate limits, error conditions, authentication requirements, or what 'clean markdown' specifically means in terms of formatting.

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 perfectly concise with just two sentences that each serve distinct purposes: the first states the core functionality, the second provides critical usage information. There's zero wasted language, and the most important information is front-loaded.

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?

For a single-parameter tool with 100% schema coverage but no output schema, the description provides adequate basic information about what the tool does and its cost. However, it doesn't describe the output format (what 'clean markdown' looks like) or potential limitations, which would be helpful given the lack of output schema.

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 schema description coverage is 100%, with the single parameter 'url' already well-documented in the schema. The description doesn't add any additional parameter semantics beyond what the schema provides, so it meets the baseline expectation but doesn't enhance understanding of the parameter.

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 the specific action ('Convert a URL to clean markdown') and the resource ('URL'), making the purpose immediately understandable. It distinguishes itself from siblings like 'browse', 'crawl', or 'extract' by focusing specifically on markdown conversion rather than general web interaction or content extraction.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool ('Convert a URL to clean markdown') and includes important usage information ('Costs 2 credits'). However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools, which would be needed for a perfect score.

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/CSteenkamp/searchclaw-mcp'

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