Skip to main content
Glama

面灵AI 面试助手

upload_knowledge_base_file

上传一个文件新建为面试知识库:抽取文件文字作为知识库正文,返回知识库 ID 与正文字数。文件内容以 base64 传入;支持 .pdf .doc .docx .txt .md .jpg .jpeg .png .webp,单个文件不超过 10MB。(需要用户授权,范围 interviews:write)

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": {
      "fileName": "<fileName>",
      "fileBase64": "<fileBase64>"
    },
    "name": "upload_knowledge_base_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNameYes文件名(含扩展名)
fileBase64Yes文件内容的 base64

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare this is a non-read-only, non-destructive, closed-world write; the description adds substantial behavior beyond them: text extraction, the returned knowledge base ID and body character count, and required authorization scope interviews:write. It does not mention failure modes (unsupported type, oversized file, extraction failure) or what happens on duplicate names, keeping it short of a 5.

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?

Purpose and outcome are front-loaded in the first clause, followed by the encoding/format/limit constraints and the authorization scope in a compact parenthetical. Every clause carries operative information with no redundancy.

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?

With no output schema, the description correctly states the return values, and it covers formats, size limit, encoding, and authorization, which is nearly everything needed for a two-parameter upload tool. Minor gaps remain around failure handling and duplicate-name behavior.

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?

Schema coverage is 100%, so the baseline is 3, and the description earns an extra point by giving the encoding contract (content passed as base64) and the accepted extension whitelist that constrains fileName. It stops short of documenting parameter-level error behavior.

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 uses a specific verb and resource ('上传一个文件新建为面试知识库') and states the mechanism (extract file text as the knowledge base body), which separates it from siblings like create_knowledge_base or add_knowledge_base_entry that operate on existing or empty knowledge bases. An agent can select it without opening the schema.

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?

It makes clear this is the path for creating a knowledge base from a file, implying empty-base creation and entry-adding belong to other tools, but it never names an alternative or states when not to use it explicitly. The usage context is clear, with only explicit routing missing.

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