Skip to main content
Glama
skrapeai

Skrape MCP Server

Official
by skrapeai

get_markdown

Extract clean markdown content from webpages for language model processing, with JavaScript rendering and JSON output options.

Instructions

Get markdown content from a webpage using skrape.ai

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the webpage to scrape
returnJsonNoWhether to return JSON response (true) or raw markdown (false)
optionsNoAdditional scraping options

Implementation Reference

  • The main handler for the 'get_markdown' tool. It destructures arguments, validates the URL, calls the Skrape.ai API via axios, handles the response as markdown or JSON, and manages errors.
    case "get_markdown": {
      const { url, returnJson = false, options = { renderJs: true } } = request.params.arguments || {};
    
      if (!url || typeof url !== "string") {
        throw new McpError(ErrorCode.InvalidParams, "URL is required and must be a string");
      }
    
      try {
        const response = await axios.post(
          "https://skrape.ai/api/markdown",
          { url, options },
          {
            headers: {
              "Authorization": `Bearer ${API_KEY}`,
              "Content-Type": returnJson ? "application/json" : "text/markdown"
            }
          }
        );
    
        return {
          content: [{
            type: "text",
            text: returnJson ? JSON.stringify(response.data, null, 2) : response.data
          }]
        };
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new McpError(
            ErrorCode.InternalError,
            `Skrape API error: ${error.response?.data?.message || error.message}`
          );
        }
        throw error;
      }
    }
  • Input schema for the 'get_markdown' tool defining the expected parameters: url (required), returnJson, and options with renderJs.
    inputSchema: {
      type: "object",
      properties: {
        url: {
          type: "string",
          description: "URL of the webpage to scrape"
        },
        returnJson: {
          type: "boolean",
          description: "Whether to return JSON response (true) or raw markdown (false)",
          default: false
        },
        options: {
          type: "object",
          description: "Additional scraping options",
          properties: {
            renderJs: {
              type: "boolean",
              description: "Whether to render the JavaScript content of the website",
              default: true
            }
          },
          default: { renderJs: true }
        }
      },
      required: ["url"]
    }
  • src/index.ts:33-63 (registration)
    Registration of the 'get_markdown' tool in the ListTools handler response, providing name, description, and schema.
    {
      name: "get_markdown",
      description: "Get markdown content from a webpage using skrape.ai",
      inputSchema: {
        type: "object",
        properties: {
          url: {
            type: "string",
            description: "URL of the webpage to scrape"
          },
          returnJson: {
            type: "boolean",
            description: "Whether to return JSON response (true) or raw markdown (false)",
            default: false
          },
          options: {
            type: "object",
            description: "Additional scraping options",
            properties: {
              renderJs: {
                type: "boolean",
                description: "Whether to render the JavaScript content of the website",
                default: true
              }
            },
            default: { renderJs: true }
          }
        },
        required: ["url"]
      }
    }
Behavior2/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 mentions the tool uses skrape.ai but doesn't describe rate limits, authentication needs, error handling, or what happens if scraping fails. For a web scraping tool with zero annotation coverage, this is a significant 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 a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, clearly stating the core functionality without unnecessary details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of web scraping (potential for errors, rate limits, etc.), no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like what the return format looks like, error conditions, or usage constraints, leaving significant gaps for an AI agent.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any meaning beyond what the input schema provides, such as explaining trade-offs between JSON vs. raw markdown or when to adjust JavaScript rendering. Baseline 3 is appropriate when 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: 'Get markdown content from a webpage using skrape.ai'. It specifies the action (get), resource (markdown content), and method (using skrape.ai). However, it doesn't differentiate from siblings since there are none, so it can't earn a 5 for that criterion.

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 provides no guidance on when to use this tool versus alternatives, prerequisites, or limitations. It merely states what the tool does without context about appropriate scenarios or constraints.

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/skrapeai/skrape-mcp'

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