Skip to main content
Glama

Train KB from PDF

lyzr_kb_train_pdf

Upload a PDF and train it into a knowledge base to enable accurate retrieval and question answering. Specify the RAG system ID and provide file content in base64.

Instructions

Upload and train a PDF file into a knowledge base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rag_idYesThe ID of the RAG system to train
filenameYesName of the file being uploaded
mime_typeNoMIME type of the file (optional)
chunk_sizeNoChunk size for splitting the document (default 1000)
extra_infoNoExtra metadata JSON string (default "{}")
data_parserNoOptional parser strategy name to use for this file
chunk_overlapNoChunk overlap for splitting the document (default 100)
parser_configNoOptional JSON string with parser configuration
file_content_base64YesBase64-encoded contents of the file to train
Behavior2/5

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

The annotations already indicate this is a non-read-only, non-idempotent operation, but the description adds little beyond that it uploads and trains a PDF. It does not disclose asynchronous behavior, output/return format, file size limits, or potential side effects on the knowledge base, which is significant for a mutating tool with no output 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 description is a single, focused sentence with no filler or redundancy. It is well-structured and front-loaded, though it is quite sparse and could incorporate more useful detail without becoming verbose.

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?

Given the tool has 9 parameters, no output schema, and mutating behavior, the one-line description is incomplete. It does not explain how the training process works, whether it is synchronous or async, how to verify success, or what the caller should expect in return, leaving significant gaps for an agent.

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?

The schema provides 100% parameter coverage with clear descriptions for all 9 fields, so the baseline is 3. The tool description itself adds no parameter-level meaning beyond what the schema already documents, so it neither improves nor harms the agent's understanding.

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 clearly states the action ('upload and train') and the resource ('a PDF file into a knowledge base'), which is more specific than the title alone. However, it does not explicitly distinguish this from sibling tools like lyzr_kb_train_documents or lyzr_parse_pdf, so it stops short of full differentiation.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as lyzr_kb_train_text, lyzr_kb_train_website, or lyzr_kb_train_documents. The description offers no context, prerequisites, or exclusions, leaving the agent without direction for tool selection.

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/nandanNM/lyzr-mcp'

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