Skip to main content
Glama

context_window

Builds an optimal context window for queries by retrieving relevant memories and documents, prioritizing content, and truncating to fit token budgets for AI tool preparation.

Instructions

Build an optimal context window for a query within a token budget. Retrieves relevant memories and documents, assembles them in priority order, and truncates to fit. Use this to prepare context for another AI tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
token_budgetNo
include_documentsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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/besslframework-stack/project-tessera'

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