Skip to main content
Glama
micaelmalta

Fetch MCP Server

by micaelmalta

smart_fetch

Read-onlyIdempotent

Fetches URLs and auto-optimizes content: HTML to clean markdown, JSON to schema/sample, cutting LLM token usage.

Instructions

Fetch any URL and auto-optimize based on content type.

For HTML: converts to clean markdown, stripping navigation, ads, and scripts. For JSON: returns a schema + sample by default for large arrays. Use the jsonpath parameter to drill into specific items or fields on follow-up calls. Dramatically reduces token usage compared to raw fetching.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ttlNoCache TTL in seconds (default 1800)
urlYesURL to fetch
headersNoOptional HTTP headers (e.g. {'Authorization': 'Bearer token'})
jsonpathNoJSONPath expression to drill into JSON data (e.g. '$[0:5]', '$[*].name', '$[?@.id==42]')
max_charsNoMaximum characters in output
max_depthNoMax nesting depth for JSON before flattening (default 5)
use_cacheNoReturn cached response if available (default True)
extract_metadataNoInclude YAML frontmatter with page metadata (HTML only)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Goes beyond the readOnly/idempotent annotations by disclosing the HTML transformation (stripping navigation, ads, scripts), JSON default behavior (schema + sample for large arrays), and the availability of jsonpath for refinement. This adds meaningful behavioral context without contradiction.

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?

Three short, focused paragraphs. The main purpose is front-loaded, and every sentence provides useful detail without redundancy. It is appropriately concise given the tool's complexity.

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

Completeness4/5

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

The description covers the two primary content types and key behaviors, and the presence of an output schema reduces the need to explain return values. It does not mention caching, headers, or error handling, but these are documented in the schema/annotations, making the overall definition sufficiently complete for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions cover 100% of parameters, but the description adds semantic value by explaining the intended use of jsonpath (drill into specific items on follow-up calls) and the default JSON output behavior. It also highlights token-reduction benefits that influence parameter choices like max_chars.

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 opens with a specific verb+resource: 'Fetch any URL and auto-optimize based on content type.' It clearly distinguishes from siblings by highlighting content-type adaptation (HTML→markdown, JSON→schema+sample) and token reduction, which sets it apart from browser_fetch or pdf_fetch.

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?

Provides clear context on when to use the tool: for HTML vs JSON, and instructs to use the jsonpath parameter for follow-up drilling into JSON data. It also implies a token-saving use case, though it does not explicitly name alternative tools or state when not to use it.

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/micaelmalta/fetch-mcp'

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