Skip to main content
Glama

extract_concepts

Tags a passage of text with the FOLIO legal concepts it mentions, returning each concept's IRI, label, and branch for a quick first-pass review of clauses, fact patterns, or briefs.

Instructions

Tag a passage of text with the FOLIO concepts it mentions.

Paste a fact pattern, clause, email, or brief excerpt; returns every FOLIO concept whose label or synonym appears in it (e.g., "tenant", "eviction", "temporary restraining order", "Bankruptcy Court", "EEOC"), with its branch. Dictionary matching, not inference: use it as a fast first pass, then get_concept(iri) or the classification prompts for judgment calls. The first call builds the label index (about 2s).

Args: text: The text to tag (up to 100,000 characters). limit: Maximum concepts to return, in order of first mention (default 50). branch: Optional branch filter, e.g. "areas_of_law", "document_artifacts", "actors_players", "forum_venues" (see list_branches).

Returns: JSON {"count", "concepts": [{iri, label, branch, match_type, matched_text, count, first_offset}]}.

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": {
      "text": "<text>"
    },
    "name": "extract_concepts"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
limitNo
branchNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.5

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so: it discloses the first-call latency ('builds the label index (about 2s)'), the matching mechanism and its limitation, and the ordering rule for results. It also states the input size ceiling, which is a real operational constraint not visible in the schema.

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 opening sentence front-loads the purpose, and the usage caveat follows immediately, so the important material is where an agent will read it. The Args/Returns blocks are slightly redundant against the schema, but they add constraints and field names rather than merely restating types.

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

Completeness5/5

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

Although an output schema exists, the description still names the returned JSON fields, which helps an agent plan follow-up calls like get_concept(iri) using the returned iri. Between mechanism, latency, limits, and escalation path, nothing material is missing for a 3-parameter tagging tool.

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

Parameters5/5

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

Schema description coverage is 0%, so the text must compensate fully, and it does: 'text' gets a 100,000-character ceiling, 'limit' is defined as a max ordered by first mention with default 50, and 'branch' gets concrete example values plus a pointer to list_branches. All three parameters gain meaning beyond the bare JSON schema types.

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?

States a specific verb and resource ('Tag a passage of text with the FOLIO concepts it mentions') and gives concrete examples of what a concept looks like. It also distinguishes itself from sibling lookup tools by framing the output as concepts plus branch, which no other named sibling claims to do.

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?

Explicitly says 'Dictionary matching, not inference: use it as a fast first pass, then get_concept(iri) or the classification prompts for judgment calls,' naming the alternatives and the condition that selects them. This is exactly the when-to-use vs. when-to-escalate guidance an agent needs.

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