Skip to main content
Glama
UpstageAI

MCP-Upstage-Server

Official
by UpstageAI

generate_schema

Analyzes documents to automatically create JSON schemas for structured data extraction, enabling consistent field definitions across similar documents.

Instructions

Generate an extraction schema for a document using Upstage AI's schema generation API.

This tool analyzes a document and automatically generates a JSON schema that defines the structure and fields that can be extracted from similar documents. The generated schema can then be used with the extract_information tool when auto_generate_schema is set to false.

This is useful when you want to:

  • Create a reusable schema for multiple similar documents

  • Have more control over the extraction fields

  • Ensure consistent field naming and structure across extractions

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

The tool returns both a readable schema object and a schema_json string that can be directly copied and used with the extract_information tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
Behavior4/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: supported file formats (JPEG, PNG, etc.), constraints (max file size: 50MB, max pages: 100), and the return format (both a readable schema object and a schema_json string). However, it lacks details on error handling, rate limits, or authentication needs, which would be beneficial for a tool with no annotations.

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 and front-loaded, starting with the core purpose. Each sentence adds value: the first explains the tool's function, the second details usage scenarios, the third lists technical constraints, and the fourth describes the output. There is no redundant or wasted information.

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 (AI-based schema generation), no annotations, no output schema, and 0% schema coverage, the description does a good job by covering purpose, usage, constraints, and output. However, it could be more complete by including error cases, example outputs, or more details on the schema structure, which would help an agent use it effectively in varied contexts.

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?

With 0% schema description coverage and 1 parameter (file_path), the description must compensate. It adds significant meaning by specifying supported file formats and constraints (max file size: 50MB, max pages: 100), which clarifies the expected input beyond the basic schema. However, it doesn't detail the file_path format or examples, leaving some ambiguity.

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: 'Generate an extraction schema for a document using Upstage AI's schema generation API.' It specifies the verb ('generate'), resource ('extraction schema'), and distinguishes from siblings by mentioning its output is used with 'extract_information' when 'auto_generate_schema' is false, unlike classify_document or parse_document.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'This is useful when you want to: - Create a reusable schema for multiple similar documents - Have more control over the extraction fields - Ensure consistent field naming and structure across extractions.' It also mentions the alternative: using the generated schema with 'extract_information' when 'auto_generate_schema' is false, providing clear context 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/UpstageAI/mcp-upstage-server'

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