Skip to main content
Glama

record_extraction

Destructive

Records the entities and relationships extracted from a single page, replacing prior data for that page during an auditable medical literature review.

Instructions

Record the entities and relationships extracted from one page (re-recording replaces it). Rules: guide("extraction").

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": {
      "run_id": "<run_id>",
      "uid": "<uid>",
      "content_sha256": "<content_sha256>",
      "page": "<page>",
      "entities": "<entities>",
      "relationships": "<relationships>"
    },
    "name": "record_extraction"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYes
pageYes
run_idYesRun ID from start_search
entitiesYes
relationshipsYes
content_sha256Yes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.3.0
    • removedInput schema / $defs
      Removed value: -{
      -  "ExtractedEntity": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "description": {
      -        "description": "How this page depicts it",
      -        "maxLength": 600,
      -        "minLength": 1,
      -        "title": "Description",
      -        "type": "string"
      -      },
      -      "entity_id": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Id of a known entity this refers to",
      -        "title": "Entity Id"
      -      },
      -      "entity_type": {
      -        "description": "See guide('ontology')",
      -        "enum": [
      -          "CONDITION",
      -          "INTERVENTION",
      -          "TECHNOLOGY",
      -          "METHOD",
      -          "GUIDELINE",
      -          "DATASET",
      -          "CONCEPT",
      -          "PERSON",
      -          "ORGANIZATION",
      -          "PLACE"
      -        ],
      -        "title": "Entity Type",
      -        "type": "string"
      -      },
      -      "mention": {
      -        "description": "Verbatim span from this page",
      -        "maxLength": 300,
      -        "minLength": 1,
      -        "title": "Mention",
      -        "type": "string"
      -      },
      -      "name": {
      -        "description": "Canonical name",
      -        "maxLength": 150,
      -        "minLength": 1,
      -        "title": "Name",
      -        "type": "string"
      -      },
      -      "role": {
      -        "anyOf": [
      -          {
      -            "enum": [
      -              "population",
      -              "intervention",
      -              "comparator",
      -              "outcome",
      -              "concept",
      -              "context"
      -            ],
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "PICO/PCC role in this article's study, if any",
      -        "title": "Role"
      -      }
      -    },
      -    "required": [
      -      "name",
      -      "entity_type",
      -      "description",
      -      "mention"
      -    ],
      -    "title": "ExtractedEntity",
      -    "type": "object"
      -  },
      -  "ExtractedRelationship": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "detail": {
      -        "default": "",
      -        "maxLength": 400,
      -        "title": "Detail",
      -        "type": "string"
      -      },
      -      "evidence": {
      -        "description": "Verbatim quote from this page",
      -        "maxLength": 400,
      -        "minLength": 1,
      -        "title": "Evidence",
      -        "type": "string"
      -      },
      -      "relationship": {
      -        "description": "Active verb",
      -        "maxLength": 60,
      -        "minLength": 1,
      -        "title": "Relationship",
      -        "type": "string"
      -      },
      -      "source": {
      -        "description": "Entity name from this call",
      -        "minLength": 1,
      -        "title": "Source",
      -        "type": "string"
      -      },
      -      "target": {
      -        "description": "Entity name from this call",
      -        "minLength": 1,
      -        "title": "Target",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "source",
      -      "target",
      -      "relationship",
      -      "evidence"
      -    ],
      -    "title": "ExtractedRelationship",
      -    "type": "object"
      -  }
      -}
    • removedInput schema / properties / entities / items / $ref
      Removed value: -"#/$defs/ExtractedEntity"
    • addedInput schema / properties / entities / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / entities / items / properties
      Added value: +{
      +  "description": {
      +    "description": "How this page depicts it",
      +    "maxLength": 600,
      +    "minLength": 1,
      +    "title": "Description",
      +    "type": "string"
      +  },
      +  "entity_id": {
      +    "anyOf": [
      +      {
      +        "type": "integer"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "description": "Id of a known entity this refers to",
      +    "title": "Entity Id"
      +  },
      +  "entity_type": {
      +    "description": "See guide('ontology')",
      +    "enum": [
      +      "CONDITION",
      +      "INTERVENTION",
      +      "TECHNOLOGY",
      +      "METHOD",
      +      "GUIDELINE",
      +      "DATASET",
      +      "CONCEPT",
      +      "PERSON",
      +      "ORGANIZATION",
      +      "PLACE"
      +    ],
      +    "title": "Entity Type",
      +    "type": "string"
      +  },
      +  "mention": {
      +    "description": "Verbatim span from this page",
      +    "maxLength": 300,
      +    "minLength": 1,
      +    "title": "Mention",
      +    "type": "string"
      +  },
      +  "name": {
      +    "description": "Canonical name",
      +    "maxLength": 150,
      +    "minLength": 1,
      +    "title": "Name",
      +    "type": "string"
      +  },
      +  "role": {
      +    "anyOf": [
      +      {
      +        "enum": [
      +          "population",
      +          "intervention",
      +          "comparator",
      +          "outcome",
      +          "concept",
      +          "context"
      +        ],
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "description": "PICO/PCC role in this article's study, if any",
      +    "title": "Role"
      +  }
      +}
    • addedInput schema / properties / entities / items / required
      Added value: +[
      +  "name",
      +  "entity_type",
      +  "description",
      +  "mention"
      +]
    • addedInput schema / properties / entities / items / title
      Added value: +"ExtractedEntity"
    • addedInput schema / properties / entities / items / type
      Added value: +"object"
    • removedInput schema / properties / relationships / items / $ref
      Removed value: -"#/$defs/ExtractedRelationship"
    • addedInput schema / properties / relationships / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / relationships / items / properties
      Added value: +{
      +  "detail": {
      +    "default": "",
      +    "maxLength": 400,
      +    "title": "Detail",
      +    "type": "string"
      +  },
      +  "evidence": {
      +    "description": "Verbatim quote from this page",
      +    "maxLength": 400,
      +    "minLength": 1,
      +    "title": "Evidence",
      +    "type": "string"
      +  },
      +  "relationship": {
      +    "description": "Active verb",
      +    "maxLength": 60,
      +    "minLength": 1,
      +    "title": "Relationship",
      +    "type": "string"
      +  },
      +  "source": {
      +    "description": "Entity name from this call",
      +    "minLength": 1,
      +    "title": "Source",
      +    "type": "string"
      +  },
      +  "target": {
      +    "description": "Entity name from this call",
      +    "minLength": 1,
      +    "title": "Target",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / relationships / items / required
      Added value: +[
      +  "source",
      +  "target",
      +  "relationship",
      +  "evidence"
      +]
    • addedInput schema / properties / relationships / items / title
      Added value: +"ExtractedRelationship"
    • addedInput schema / properties / relationships / items / type
      Added value: +"object"
  2. First observedv0.1.1

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already flag destructiveHint=true and idempotentHint=false; the description's '(re-recording replaces it)' adds real information about overwrite-on-repeat semantics that the annotations alone don't convey. It still omits the run-scoped nature of the write, commit/finalize behavior, and any validation or failure mode, so it adds some but not rich context.

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 short sentences, front-loaded with the action and the overwrite caveat. Efficient, though 'Rules: guide("extraction")' is terse to the point of being cryptic about what the guide is for.

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

Completeness2/5

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

For a destructive, non-idempotent write with six required parameters, 17% schema coverage, and no documented fields, the description is thin; it lacks prerequisory workflow position, the meaning of content_sha256, and any indication of what happens to prior data. The presence of an output schema excuses it from explaining return values, but not from the rest.

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

Parameters2/5

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

Schema description coverage is 17%, and the description compensates for almost none of it: content_sha256, page, uid, and the entities/relationships payloads get no mention or semantics beyond the phrase 'one page'. With four of six required parameters effectively undocumented in the prose, an agent gets little help interpreting why a content hash or uid must accompany the call.

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: record entities and relationships extracted from one page. An agent can distinguish it from record_triage_scores or record_synthesis by the entity/relationship payload, though the description never says explicitly that this is a page-level write step in the extraction workflow, so sibling separation is inferred rather than stated.

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

Usage Guidelines3/5

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

Points the agent at guide("extraction") for rules, which is useful routing, and 'extracted from one page' implies it is called after extraction. But it never states prerequisites (run_id from start_search is only in the schema) or when-not-to-use, and delegating all rules to another tool means the description itself carries no exclusions.

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