Skip to main content
Glama
puremd

pure.md MCP server

Official
by puremd

search-web

Retrieve web content in markdown format by querying the pure.md MCP server, enabling AI clients to access and process blocked or searchable online resources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • Inline handler function for the "search-web" tool. Fetches web search results from the pure.md API using the provided query, returns markdown content in MCP format, or an error message if the request fails.
    server.tool("search-web", { query: z.string() }, async ({ query }) => { try { const response = await fetch(`https://pure.md/search?q=${query}`, { headers: { "x-puremd-api-token": PUREMD_API_KEY }, }); const markdown = await response.text(); return { content: [{ type: "text", text: markdown }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: (error as Error).message }], isError: true, }; } });
  • Zod schema for the "search-web" tool input: a single required string parameter named "query".
    server.tool("search-web", { query: z.string() }, async ({ query }) => {
  • src/index.ts:43-59 (registration)
    Registers the "search-web" MCP tool with server.tool(), providing schema and handler implementation.
    server.tool("search-web", { query: z.string() }, async ({ query }) => { try { const response = await fetch(`https://pure.md/search?q=${query}`, { headers: { "x-puremd-api-token": PUREMD_API_KEY }, }); const markdown = await response.text(); return { content: [{ type: "text", text: markdown }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: (error as Error).message }], isError: true, }; } });

Other Tools

Related 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/puremd/puremd-mcp'

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