Skip to main content
Glama

Get extraction prompt

get_extraction_prompt
Read-onlyIdempotent

Add a document to the knowledge graph by extracting it YOURSELF, in this chat.

Use whenever the user shares a document/notes/transcript and wants it
captured in the graph, and you (this assistant) should do the extraction.
`memory` is the graph's slug from list_my_memories. `pass_name` is
"classes" or "objects" (the API's `pass`): fetch ONE pass per call, as
both at once can be too long for your tool output.

The flow: (1) get_extraction_prompt(memory, pass_name="classes") and run
its prompt over the document you already have, checking any class you
would mint with one resolve_names call; (2) submit that JSON alone:
submit_extraction_from_llm(memory, {"classes": ...}, source_doc=...);
(3) get_extraction_prompt(memory, pass_name="objects"), run it, then call
resolve_names ONCE with every candidate name and reuse each returned
canonical name + class; (4) submit_extraction_from_llm(memory,
{"objects": ...}) with the same source_doc. Each reply's `instructions`
says the next step. The document is NOT sent to the server, and no object
list is embedded in the prompts: resolve_names is how you see what exists.

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": {
      "memory": "<memory>"
    },
    "name": "get_extraction_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoryYes
pass_nameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / pass_name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "classes",
      +        "objects"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Pass Name"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds genuinely new behavioral facts: the document is NOT sent to the server, no object list is embedded in the prompts, resolve_names is the only way to see what exists, and each reply contains an `instructions` field pointing to the next step. These are non-obvious properties that materially change how an agent should behave.

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 multi-step numbered flow is efficient and information-dense, but the description spends substantial text on sibling calls (submit_extraction_from_llm, resolve_names) rather than this tool, and the first sentence is a workflow headline rather than a front-loaded statement of this tool's job. Not bloated, but the front-loading could be sharper.

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?

An output schema exists, so return values need not be enumerated, and the description still points at the salient `instructions` field. Given the sequencing risk of a multi-pass extraction pipeline, the description supplies everything needed to invoke the tool correctly in context.

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?

With 0% schema description coverage, the description must carry the parameter burden and it does: `memory` is defined as the graph slug obtained from list_my_memories, and `pass_name` is defined as "classes" or "objects" (explicitly noted as the API's `pass`). It even explains the one-pass-per-call rule, which is a semantic constraint the bare schema cannot express.

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 quickly lands on the concrete mechanics: get_extraction_prompt(memory, pass_name="classes") returns a prompt whose `instructions` says the next step, and it names the resource (the memory/graph) and the pass variant. However, the opening sentence ("Add a document to the knowledge graph by extracting it YOURSELF") describes the overall workflow outcome rather than this tool's own verb, which could momentarily make an agent think this call ingests the document. It is still clearly distinguished from submit_extraction_from_llm, which does the submitting.

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?

Explicit trigger condition is given: use whenever the user shares a document/notes/transcript and wants it captured, and the assistant itself is doing extraction. It also gives a hard operational constraint ("fetch ONE pass per call, as both at once can be too long for your tool output") and sequences the call against resolve_names and submit_extraction_from_llm.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources