Skip to main content
Glama

extract

Fetch any URL and extract structured fields that match a caller-supplied JSON schema using an LLM, working on any site. Provide a JSON schema to get typed data back from arbitrary web pages.

Instructions

Fetch a URL and extract structured fields matching a caller-supplied JSON schema, using an LLM — works on ANY site, not just ones with a dedicated recipe. Use list_recipes first if you suspect a faster, higher-confidence deterministic recipe already exists for this site.

Args:
    url: The URL to extract structured data from.
    json_schema: A JSON Schema (as a JSON string) describing the fields
        to extract, e.g. '{"type":"object","properties":{"price":
        {"type":"number"},"title":{"type":"string"}}}'.
    instructions: Optional extra guidance for the extraction model.

Requires ANTHROPIC_API_KEY to be set in the environment — this tool
will return a diagnosable failure (not a crash) if it isn't.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
json_schemaYes
instructionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations present, the description carries full behavioral burden and does well: it discloses that the tool uses an LLM (hence slower/less deterministic), requires ANTHROPIC_API_KEY, and specifies failure behavior (diagnosable failure, not crash). This is meaningful operational context beyond the schema. It could note potential cost/latency implications but already covers the key operational constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with a purpose paragraph followed by an Args section. The json_schema example is slightly verbose but earns its place since it demonstrates the exact expected format. One minor inefficiency: the API-key disclosure could be more concise, but the overall structure is clean and front-loaded with the primary purpose.

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 tool is moderately complex (LLM-based, 3 params including a nested JSON schema string), and despite no annotations, the description covers purpose, fallback behavior, an example, auth requirement, and failure mode. The output schema is present, so return-value documentation isn't required. A note on typical latency or cost of LLM extraction would be a nice addition, but the core operational needs are satisfied.

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 description coverage is 0%, so the description must compensate for all three parameters. It does: url (URL to extract from), json_schema (JSON Schema string with a concrete example), and instructions (optional guidance). The json_schema example is particularly valuable since the schema's title 'Json Schema' alone is insufficient for an agent to construct a valid value.

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 verb (fetch+extract), the resource (URL with structured fields), and the mechanism (LLM-based, works on ANY site). It explicitly distinguishes itself from the sibling `list_recipes`/`use_recipe` tools, noting the alternative is for sites with dedicated deterministic recipes. This is specific and well-differentiated.

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

Usage Guidelines5/5

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

The description gives an explicit when-to-use directive: use `list_recipes` first if a deterministic recipe may exist, otherwise use this tool for generic extraction. This directly addresses the usage decision relative to its sibling tools and provides clear guidance on the alternative path.

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/Kaushalendra-Marcus/evident'

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