Skip to main content
Glama
UpstageAI

MCP-Upstage-Server

Official
by UpstageAI

classify_document

Analyze documents to classify them into categories like invoice, receipt, contract, or custom types using AI, supporting multiple file formats up to 50MB.

Instructions

Classify a document into predefined categories using Upstage AI's document classification API.

This tool analyzes a document and classifies it into one of several predefined categories such as invoice, receipt, contract, CV, bank statement, and others. You can use the default classification schema or provide your own custom classification categories.

Supported file formats: JPEG, PNG, BMP, PDF, TIFF, HEIC, DOCX, PPTX, XLSX Max file size: 50MB Max pages: 100

DEFAULT CATEGORIES:

  • invoice: Commercial invoice with itemized charges and billing information

  • receipt: Receipt showing purchase transaction details

  • contract: Legal agreement or contract document

  • cv: Curriculum vitae or resume

  • bank_statement: Bank account statement showing transactions

  • tax_document: Tax forms or tax-related documents

  • insurance: Insurance policy or claims document

  • business_card: Business card with contact information

  • letter: Formal or business letter

  • form: Application form or survey form

  • certificate: Certificate or diploma

  • report: Business report or analytical document

  • others: Other document types not listed above

CUSTOM CATEGORIES: Simply provide an array of categories in schema_json: [ {"const": "category1", "description": "Description of category 1"}, {"const": "category2", "description": "Description of category 2"}, {"const": "others", "description": "Other"} ]

Example custom schema_json: [{"const":"medical","description":"Medical records or health documents"},{"const":"legal","description":"Legal documents"},{"const":"financial","description":"Financial statements or reports"},{"const":"others","description":"Other"}]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
schema_pathNo
schema_jsonNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively adds context beyond basic functionality: it specifies supported file formats (JPEG, PNG, etc.), max file size (50MB), max pages (100), and details about default and custom categories. However, it does not mention rate limits, authentication needs, or error handling.

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

Conciseness3/5

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

The description is appropriately sized but could be more front-loaded. Key information like supported formats and limits is included, but the extensive listing of default categories and custom schema examples, while useful, makes it slightly verbose. Every sentence earns its place, but structure could be tighter.

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?

Given the complexity (3 parameters, 0% schema coverage, no output schema, no annotations), the description is largely complete. It covers purpose, usage, parameters, and behavioral details like file constraints. However, it lacks information on output format or error responses, which would enhance completeness.

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?

The schema description coverage is 0%, so the description must compensate. It thoroughly explains the parameters: 'file_path' for the document to classify, 'schema_path' and 'schema_json' for custom categories, with detailed examples and formatting guidelines. This adds significant meaning beyond the bare input schema.

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's purpose: 'Classify a document into predefined categories using Upstage AI's document classification API.' It specifies the verb ('classify'), resource ('document'), and distinguishes it from siblings like 'extract_information' or 'parse_document' by focusing on categorization rather than data extraction or parsing.

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 description provides clear context for when to use this tool: for document classification into categories like invoice, receipt, contract, etc. It mentions using default or custom categories, but does not explicitly state when to choose this over sibling tools (e.g., 'extract_information') or when not to use it (e.g., for non-document files).

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/UpstageAI/mcp-upstage-server'

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