Skip to main content
Glama

load_document

Load PDF, text, or markdown documents into the knowledge graph and automatically extract business rules for validation.

Instructions

Load a document (PDF, Text, Markdown) into the knowledge graph and automatically extract business rules.

Usage:

  • Load a file: load_document(file_path='/path/to/rules.pdf')

  • Upload content: load_document(content='Rule 1:...', title='My Rules')

What it does:

  1. Parses the document

  2. Stores metadata in the graph

  3. Analyzes content with LLM to extract business rules

  4. Saves extracted rules as 'PENDING' for validation

Options:

  • store_content: Set to True to save full text in graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL of the document (not yet implemented)
titleNoTitle of the document (optional, auto-detected if file)
prefixNoPrefix to add to extracted rule IDs (e.g., 'HR_', 'GDPR_')
contentNoDirect text content to load
file_pathNoAbsolute path to the document file (PDF, TXT, MD)
extract_rulesNoWhether to automatically extract rules using LLM
store_contentNoWhether to store the full text content in the knowledge graph
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses parsing, metadata storage, LLM-based rule extraction, and the creation of rules in 'PENDING' state. This is substantial behavioral context, though it does not mention behavior around extract_rules=false or failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a one-sentence summary, usage examples, a numbered process list, and an options section. Each section is purposeful and information is front-loaded; the length is justified by the tool's complexity.

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?

The description covers inputs, processing steps, and the PENDING rule state, which is good for a tool with no output schema. However, it does not describe the return value or response format, and it omits the extract_rules toggle even though that is a significant behavior.

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 baseline is 3. The description adds usage examples for file_path/content and repeats store_content, but provides no additional semantics beyond the schema for extract_rules, prefix, url, or title.

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 has a specific verb and resource: 'Load a document ... into the knowledge graph and automatically extract business rules.' It clearly differentiates the tool from siblings like load_custom_rule and add_memory by focusing on document ingestion and rule extraction.

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 'Usage' section gives concrete examples for both file_path and content, and the 'What it does' section explains the pipeline. However, it does not explicitly mention when to prefer this tool over alternatives like load_custom_rule, so it stops short of full exclusionary guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MauriceIsrael/SmartMemory'

If you have feedback or need assistance with the MCP directory API, please join our Discord server