Skip to main content
Glama

get_workspace_context

Read-onlyIdempotent

Packs a workspace record, visible channels sorted by name, a page of readable threads with messages, references and FSM transitions, plus the glossary into one prompt-ready context.

Instructions

Pack a workspace for one prompt: the workspace record, the channels you can see (public ones, and private ones you belong to) sorted by name, a page of live threads (oldest first, only ones you can read) each with its messages, references and FSM transitions, and the glossary once at the top level. thread_limit sets the page size (default 10, max 50), and next_thread_cursor, when present, is passed back as thread_cursor for the next page. Use get_thread_context for a single thread with edits and replay options, and list_threads or find_threads to locate threads without packing them. Requires workspace:read.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace_id": "<workspace_id>"
    },
    "name": "get_workspace_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_bytesNoByte cap applied to each nested thread pack: a thread whose pack is larger has its middle messages elided behind a marker. Minimum 1; omit for no cap.
thread_limitNoNumber of threads in the page, 1 to 50. Default 10.
token_budgetNoCap each nested thread's message page by estimated tokens; the opening message and the recent tail are kept and the middle is folded into an elision marker (see get_thread_context). Minimum 1; omit to cap by message count only.
workspace_idYesUUID of your own workspace (whoami returns it). A different workspace is refused.
message_limitNoMessages packed per thread, 1 to 500. Default 100.
thread_cursorNoThe next_thread_cursor from the previous page, to read the threads after it. Omit for the first page.
include_glossaryNoInclude the workspace glossary once at the top level. Defaults to true; the key is omitted when the workspace has no terms. Set false to drop it.
transition_limitNoFSM transitions packed per thread, 1 to 200. Default 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv479.0.2
    • changedInput schema / properties / include_glossary / description
      Previous value: -"Include the workspace glossary once at the top level (grounding); omitted when empty. Set false to drop it."New value: +"Include the workspace glossary once at the top level. Defaults to true; the key is omitted when the workspace has no terms. Set false to drop it."
    • changedInput schema / properties / max_bytes / description
      Previous value: -"Byte cap applied to each nested thread pack."New value: +"Byte cap applied to each nested thread pack: a thread whose pack is larger has its middle messages elided behind a marker. Minimum 1; omit for no cap."
    • addedInput schema / properties / message_limit / description
      Added value: +"Messages packed per thread, 1 to 500. Default 100."
    • addedInput schema / properties / thread_cursor
      Added value: +{
      +  "description": "The next_thread_cursor from the previous page, to read the threads after it. Omit for the first page.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedInput schema / properties / thread_limit / description
      Added value: +"Number of threads in the page, 1 to 50. Default 10."
    • changedInput schema / properties / token_budget / description
      Previous value: -"Cap each nested thread's message page by estimated tokens (see get_thread_context). Omit to cap by rows only."New value: +"Cap each nested thread's message page by estimated tokens; the opening message and the recent tail are kept and the middle is folded into an elision marker (see get_thread_context). Minimum 1; omit to cap by message count only."
    • addedInput schema / properties / transition_limit / description
      Added value: +"FSM transitions packed per thread, 1 to 200. Default 50."
    • addedInput schema / properties / workspace_id / description
      Added value: +"UUID of your own workspace (whoami returns it). A different workspace is refused."
  2. First observedv479.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses ordering (channels sorted by name, threads oldest first), visibility scoping (only public channels plus private ones you belong to, only threads you can read), the authorization boundary (a different workspace is refused), and glossary placement/omission behavior. That is substantial behavioral context the annotations do not carry.

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

Conciseness4/5

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

Front-loads the purpose and packs scoping, ordering, pagination, and routing into two dense sentences with no filler. The opening sentence is a long list-in-a-sentence that could be split for readability, but every clause carries information.

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?

For an eight-parameter aggregate-read tool with no output schema, the description fully covers what is returned, in what order, under what visibility and permission rules, and how pagination continues. Nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all eight parameters are already documented in the schema. The description reinforces only thread_limit (default 10, max 50) and the cursor roundtrip (next_thread_cursor returned, passed back as thread_cursor); it adds little for max_bytes, token_budget, message_limit, transition_limit, or include_glossary. Baseline 3 applies since the schema does the heavy lifting.

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?

States a specific verb and resource ('Pack a workspace for one prompt') and enumerates exactly what the pack contains: workspace record, visible channels sorted by name, a page of live threads oldest-first with messages/references/FSM transitions, and the glossary. This is clearly distinguishable from get_thread_context and list_threads by emphasizing 'packing' a whole workspace rather than fetching one thread or locating threads.

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?

Explicitly routes the agent to alternatives: 'Use get_thread_context for a single thread with edits and replay options, and list_threads or find_threads to locate threads without packing them.' It also states the prerequisite ('Requires workspace:read') and the constraint that another workspace is refused, giving both when-to-use and when-not signals.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools