Skip to main content
Glama

Extract structured data

extract
Read-onlyIdempotent

Extract structured data from any URL using a custom schema or a ready-made preset, or rely on defaults. Returns clean, field-level results tailored to your extraction needs.

Instructions

Extract structured data from a URL, with an extraction schema or a preset (or neither, for the defaults).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
presetNo
dry_runNoNot supported here: leave it out and use the estimate tool to price a call.
optionsNoOther API fields for this operation, merged into the request body as they are (see the Clawifi API docs).
timeout_secondsNo
extraction_schemaNoFields to extract: {name: {type, selector, ...}}; sent as the API's schema.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.4.1
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "default": null,
      +  "description": "Not supported here: leave it out and use the estimate tool to price a call.",
      +  "title": "Dry Run"
      +}
    • addedInput schema / properties / extraction_schema
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Fields to extract: {name: {type, selector, ...}}; sent as the API's schema.",
      +  "title": "Extraction Schema"
      +}
    • removedInput schema / properties / kwargs
      Removed value: -{
      -  "title": "Kwargs"
      -}
    • addedInput schema / properties / options
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Other API fields for this operation, merged into the request body as they are (see the Clawifi API docs).",
      +  "title": "Options"
      +}
    • addedInput schema / properties / preset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Preset"
      +}
    • addedInput schema / properties / timeout_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Timeout Seconds"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "url",
      -  "kwargs"
      -]New value: +[
      +  "url"
      +]
  2. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so safety behavior is covered. The description adds that extraction can run with a schema, preset, or defaults, but it does not disclose rate limits, authentication needs, or other operational behavior. With an output schema present, return values need no explanation, so this is a moderate contribution.

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 a single, front-loaded sentence with no wasted words. It efficiently states the core action and the main parameter modes, though it could benefit from slightly more structure to separate purpose from parameter behavior.

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 tool with six parameters, an output schema, and several similar siblings, the description is thin. It does not explain when to use extract over scrape/fetch, nor does it document important parameter behavior like options and timeout. It is adequate as a minimal purpose statement but leaves gaps that an agent would need to resolve elsewhere.

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 50%, and the description clarifies the relationship between extraction_schema, preset, and the 'neither' fallback case. However, parameters such as options and timeout_seconds are not explained in the description, and dry_run is only covered by the schema's note that it is unsupported. The description adds some meaning but does not fully compensate for the coverage gap.

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 states a specific verb and resource: 'Extract structured data from a URL.' It also mentions the extraction schema or preset as the output shape, which gives the agent a clear sense of what the tool does. However, it does not explicitly distinguish this tool from siblings like scrape or fetch, leaving the agent to infer the difference.

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 such as scrape, fetch, or crawl. It only explains parameter choices ('with an extraction schema or a preset'), not the contextual conditions under which this tool is the right selection. An agent has to infer usage from the name and description alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.