Skip to main content
Glama

Extract Entities

extract_entities
Read-only

Extract emails, phones, URLs, dates, IPs, and custom patterns from web pages; optionally use an LLM for named entity recognition and save full results as JSON to disk.

Instructions

Extract entities (emails, phones, etc.) from web pages. Use output_path to persist the full entity extraction output to disk as JSON and receive a slim response.

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>",
      "entity_types": "<entity_types>"
    },
    "name": "extract_entities"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesTarget URL
use_llmNoUse LLM for NER
llm_modelNoLLM model
overwriteNoOverwrite an existing output file at output_path. Defaults to False.
deduplicateNoRemove duplicates
output_pathNoAbsolute file path (auto .json extension) to persist the full entity extraction as JSON. When set, the response is slimmed (content, markdown, extracted_data.raw_content removed).
entity_typesYesRegex types: emails, phones, urls, dates, ips, prices, credit_cards, coordinates (singular forms like email/phone are accepted), plus any custom_patterns keys. Without use_llm, other types are listed under unsupported_entity_types with a warning. With use_llm=True any type name works (e.g. people, organizations, locations, products, events).
llm_providerNoLLM provider
custom_patternsNoCustom regex patterns as {type_name: regex}; list the type_name in entity_types to use it (regex mode only)
include_contextNoInclude context
include_content_in_responseNoWhen True (with output_path set), also keep the entity data in the response. Defaults to False.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed2 schema fields changedv0.4.2
    • changedInput schema / properties / custom_patterns / description
      Previous value: -"Custom regex patterns"New value: +"Custom regex patterns as {type_name: regex}; list the type_name in entity_types to use it (regex mode only)"
    • changedInput schema / properties / entity_types / description
      Previous value: -"Types: email, phone, url, date, ip, price"New value: +"Regex types: emails, phones, urls, dates, ips, prices, credit_cards, coordinates (singular forms like email/phone are accepted), plus any custom_patterns keys. Without use_llm, other types are listed under unsupported_entity_types with a warning. With use_llm=True any type name works (e.g. people, organizations, locations, products, events)."
  3. Addedv0.3.2

TDQS

B3.4/5.0
Behavior4/5

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

Beyond the single readOnlyHint annotation, the description discloses the consequential behavior: setting output_path writes the full result as JSON to disk and slims the response. The schema covers the remaining details (overwrite default, include_content_in_response), so the description adds the one piece of context an agent most needs before choosing an output path. The opt-in disk write is slightly at odds with readOnlyHint, but the primary fetch/extract action is genuinely a read, so this is a tension rather than a contradiction.

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?

Two tight sentences with no filler, and the core purpose is front-loaded ahead of the output_path note. It is efficient, though arguably too lean for a tool with 11 parameters and multiple modes.

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?

With 11 parameters, an output schema, and full schema coverage, the structured fields carry most of the load, but the description omits the important behavioral fork between regex mode (default, limited type set, unsupported types warned) and use_llm=True (arbitrary types), and gives no routing guidance among sibling extraction tools.

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 coverage is 100%, so the schema already documents all 11 parameters thoroughly, including the regex-vs-LLM entity type distinction. The description reinforces output_path semantics but adds no new meaning for url, entity_types, use_llm, or custom_patterns beyond what the schema states, so the baseline 3 applies.

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?

States a specific verb and resource ('Extract entities (emails, phones, etc.) from web pages'), which is concrete and lets an agent grasp the function immediately. It does not, however, distinguish itself from near-neighbors such as extract_structured_data or intelligent_extract, so the agent must infer the boundary.

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 only usage guidance is the sentence about output_path persisting output and returning a slim response. There is no when-to-use guidance, no mention of when to pick this over extract_structured_data or intelligent_extract, and no note that regex mode is the default versus the LLM path.

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