Skip to main content
Glama
l4b4r4b4b4
by l4b4r4b4b4

get_cached_result

Retrieve cached results with pagination using a reference ID. Preview large sequences or paginate through price series and returns.

Instructions

Retrieve a cached result, optionally with pagination.

Use this to:

  • Get a preview of a cached value

  • Paginate through large sequences, price series, or returns data

  • Access specific pages of a cached result

Args: ref_id: The reference ID returned by tools (e.g., from generate_price_series). page: Page number (1-indexed). If not provided, returns the default preview. page_size: Items per page. Default varies by data type (typically 50).

Returns: Dictionary containing: - ref_id: The reference ID - preview: The data for the current page/preview - preview_strategy: How the preview was generated (sample, truncate, paginate) - total_items: Total number of items in the full dataset - page: Current page number (if paginated) - total_pages: Total pages available (if paginated)

Example: ``` # Generate large price series (returns ref_id + preview) result = generate_price_series(symbols=["AAPL", "GOOG"], days=500)

# Get page 2 of the cached data
page2 = get_cached_result(ref_id=result["ref_id"], page=2, page_size=50)

# Get page 5
page5 = get_cached_result(ref_id=result["ref_id"], page=5)
```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ref_idYes
pageNo
page_sizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations provided, so description carries full burden. It explains caching behavior, pagination mechanics, preview strategies (sample, truncate, paginate), and that it depends on ref_id from other tools. Does not mention side effects or errors, but covers core behaviors well.

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?

Description is detailed and well-structured with sections (use cases, args, returns, example). However, it is slightly verbose; the example could be shortened. Still, it remains clear and organized.

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

Completeness5/5

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

Given no annotations, no schema descriptions, but an output schema (return dict explained), the description covers all necessary aspects: purpose, usage, parameters, return values, and examples. It is complete for an AI agent to understand and invoke the tool correctly.

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 0% (no descriptions in schema). Description compensates by explaining ref_id as tool output, page as 1-indexed with default null, and page_size with variable default. Adds meaning beyond type/null constraints.

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 retrieves a cached result with optional pagination. It distinguishes itself from siblings by specifying it works with ref_id from tools like generate_price_series, making its purpose unambiguous.

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?

Explicitly lists three use cases: get preview, paginate through large data, and access specific pages. Provides code examples. Does not explicitly exclude misuses or compare to alternatives, but context is sufficient for correct 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/l4b4r4b4b4/portfolio-mcp'

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