Skip to main content
Glama
u9401066

asset-aware-mcp

by u9401066

fetch_document_asset

Extract specific tables, figures, or sections from a PDF document. Returns markdown text or images for AI analysis, with optional resizing.

Instructions

Fetch specific content from a document with precision.

Asset Types:

  • "table": Returns table as markdown (with page number)

  • "figure": Returns image as base64 with page number for verification

  • "section": Returns section text content

  • "full_text": Returns entire document as markdown

Args: doc_id: Document identifier asset_type: One of "table", "figure", "section", "full_text" asset_id: Asset ID from manifest (e.g., "tab_1", "fig_1_1", "sec_methods") Use "full" for full_text type max_size: Maximum image dimension (longest edge) for figures. - None (default): Use default 1024px - 0: Return original size (no resize) - N: Resize to Npx longest edge (e.g., 512, 768, 2048)

Returns: For figures: ImageContent that vision AI can directly analyze For others: TextContent in markdown format

Example: # Get Table 1 from document fetch_document_asset("abc123", "table", "tab_1")

# Get figure with default resize (1024px)
fetch_document_asset("abc123", "figure", "fig_2_1")

# Get figure at specific size (512px for smaller context)
fetch_document_asset("abc123", "figure", "fig_2_1", max_size=512)

# Get original image (no resize)
fetch_document_asset("abc123", "figure", "fig_2_1", max_size=0)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
asset_idNofull
max_sizeNo
max_charsNo
asset_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden and discloses key behaviors: it returns ImageContent for figures and TextContent for others, mentions resizing behavior (default 1024px, 0 for original, N for custom), and includes page numbers for verification. It does not mention rate limits or error handling, but for the tool's complexity, the disclosure is solid.

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 with clear sections for asset types, arguments, returns, and examples. It uses bullet points and code blocks efficiently, and every sentence provides essential information. The examples are repetitive but serve as practical illustrations, so no waste.

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?

The description is complete for the main use cases, covering all parameters except max_chars (which is optional). It includes return format and examples with different parameter combinations. However, the output schema is not provided (has output schema: true but not shown), and the description doesn't explain error scenarios or how to handle missing assets, but it's adequate for the tool's complexity.

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?

Schema description coverage is 0%, so description must compensate, and it does. For each parameter, it provides clear semantics: doc_id as document identifier, asset_type as enumerated string, asset_id with examples and guidance to use 'full' for full_text, max_size with exact meaning (longest edge, 0 for original), and max_chars is not mentioned (but it's optional and the description covers the main workflow). The detailed examples clarify parameter usage beyond 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 it fetches specific content from a document with precision and lists the four asset types (table, figure, section, full_text), distinguishing it from sibling tools like get_docx_content and parse_pdf_structure by emphasizing targeted extraction. It provides detailed examples that illustrate the exact use cases.

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 explains when to use each asset type (e.g., 'table' for markdown tables, 'figure' for images) and provides examples for different scenarios (default resize, specific size, original size). It implies alternatives by noting the tool is for specific content extraction rather than whole-document retrieval, which aids selection among siblings.

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/u9401066/asset-aware-mcp'

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