Skip to main content
Glama

import_pdf

Import PDF documents into the knowledge base by extracting text, generating embeddings, and storing metadata. Supports optional title, authors, and year fields.

Instructions

导入 PDF 文献到知识库

将 PDF 文件导入到知识库,包括:

  1. 计算文件哈希

  2. 上传到 MinIO 存储

  3. 提取文本内容

  4. 分块处理

  5. 生成 embeddings

  6. 提交到数据库

执行过程会通过进度通知报告当前状态。

Args: file_path: PDF 文件的绝对路径 title: 文档标题(可选,会尝试从 PDF 元数据提取) authors: 作者(可选) year: 发表年份(可选) force: 是否强制重新导入已存在的文档

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
titleNo
authorsNo
yearNo
forceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

The description outlines the steps (hashing, upload, text extraction, chunking, embeddings, database commit) and mentions progress notifications, but lacks details on error handling, file size limits, or behavior when force=false.

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 well-structured with a bullet list and an Args section, though the step list could be slightly more concise.

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

Completeness3/5

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

The description covers the basic workflow and parameters but does not explain the output schema, error conditions, or prerequisites, leaving gaps for an AI agent.

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

Parameters4/5

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

The Args section provides meaningful explanations for each parameter beyond the schema types, such as file_path being an absolute path and title being optionally extracted from PDF metadata.

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 clearly states the tool imports PDF files into the knowledge base and lists the multi-step process, distinguishing it from sibling tools like delete_document or download_pdf.

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?

The description implies usage for importing PDFs but does not explicitly state when to use it versus alternatives or when not to use it.

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/h-lu/paperlib-mcp'

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