Skip to main content
Glama

extract_local

Extract specific facts like function names, URLs, error codes, or TODO comments from unstructured text using a local model. Runs locally to avoid cloud-model token costs and returns the requested items as text.

Instructions

Extract specific information from a text block using the local model.

Use to pull structured facts out of unstructured text — function names, URLs, error codes, TODO comments, dependency names — without spending cloud-model tokens. Runs locally at no cloud cost. Returns the extracted items as text, shaped by what_to_extract.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe source text to extract from.
modelNoOllama model name to run, e.g. 'llama3.1' or 'qwen2.5-coder'. Omit to use the server's configured default model.
what_to_extractYesWhat to pull out, e.g. 'all function definitions' or 'every URL in the file'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.3
    • addedInput schema / properties / model / description
      Added value: +"Ollama model name to run, e.g. 'llama3.1' or 'qwen2.5-coder'. Omit to use the server's configured default model."
    • addedInput schema / properties / text / description
      Added value: +"The source text to extract from."
    • addedInput schema / properties / what_to_extract / description
      Added value: +"What to pull out, e.g. 'all function definitions' or 'every URL in the file'."
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that the tool runs locally, incurs no cloud cost, and returns extracted items as text shaped by `what_to_extract`. This gives the agent enough behavioral context to set expectations, though it does not mention latency, size limits, or failure behavior.

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 concise and front-loaded with the core purpose. The only weakness is minor redundancy: "without spending cloud-model tokens" is repeated by the later sentence "Runs locally at no cloud cost." Overall it is still tight and readable.

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?

For a simple three-parameter tool with a full schema and output schema, the description is largely complete: it explains what the tool does, the kind of extraction to request, and the return form. It could improve by explicitly noting how it differs from sibling local tools, but nothing essential for correct invocation is missing.

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 100%, so the schema already documents all three parameters. The description adds some context by noting that `what_to_extract` shapes the output and providing example values, but this is reinforcing rather than substantially expanding on the schema. Baseline 3 is appropriate.

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 and resource: "Extract specific information from a text block." It then gives concrete target types (function names, URLs, error codes, TODO comments, dependency names), making the tool's purpose unmistakable and clearly distinct from the sibling chat/ask/summarize tools.

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?

The description explicitly says when to use it: to pull structured facts out of unstructured text, and positions it as a cost-saving local alternative to cloud-model extraction. It does not name explicit alternatives or when-not-to-use cases, so it falls short of a 5, but the guidance is clear and actionable.

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