Skip to main content
Glama

get_context

Fetch a compact session snapshot on wake-up: active contracts, recent lessons, pending items, live session, and counts. Etag avoids redundant brief fetches.

Instructions

一发式冷启动定位: session 醒来先调这个, 拿到"现在这个 pair 处在哪"的紧凑快照, 而不是自己拼 live_pending + snapshot + thread 好几刀. 输入 { pair_id? } (缺省用当前 active pair). 返回: active_contracts (id/title/setup_status/一行 progress/source_material——合约带自带教材条款时的一行亮灯"教材:《书名》·档位"; null=没谈教材) + recent_lessons (最近 1-2 节课的 id/title/status, 来自最近的 PostLessonEvaluation, 没有活动记录时退回 course 前两节) + pending_pool ({count, latest_titles} 脑图待整理池, 不含全量) + live_session (最近一次 id/status/ended_at + 最新 snapshot 的存在性+时间戳, 不含全文) + unread_adhoc_count (最近一次 agent 回复之后学生新发的 adhoc 消息数) + active_reminder_count (未 fire 且未 dismiss 的提醒数). Etag 契约: 返回体带 brief_etag (默认口径 learner brief 的内容指纹) —— 与上次记住的 brief_etag 一致 ⇒ 学生模型没变, 跳过 get_learner_brief 重拉; identity 只给 learner_id/agent_id, 称谓全量在 get_learner_brief。pair_id 不存在时报错并附可用 pair 列表.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pair_idNo
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns a compact snapshot with summarized fields (not full content), explicitly states what is NOT included ('不含全量', '不含全文'), and reveals an Etag contract that allows skipping get_learner_brief. It also describes error response with available pair list. This is substantial behavioral detail, though it doesn't mention side effects (likely none as a read).

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 long but dense and well-structured, with clear labels for each return field (active_contracts, recent_lessons, pending_pool, live_session, unread_adhoc_count, active_reminder_count) and the Etag contract. Every sentence adds operational value (what's included, what's omitted, when to skip dependent calls). It's front-loaded with the core purpose and then details the snapshot contents.

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 a read-only context snapshot tool with no output schema and no annotations, the description covers: purpose, when to call, what each returned field contains, what is intentionally omitted, the etag caching behavior fallback for no activity, and error behavior. This is a complete operational contract for an agent to decide when to call this vs alternatives.

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 has one optional param pair_id with zero description coverage. The description explains pair_id's semantics: it's an optional input, defaults to current active pair, and if nonexistent returns an error with available pairs. This fully compensates for the schema gap, even though the description doesn't specify the exact format (e.g., string pattern).

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?

Description clearly states it's a one-shot cold-start positioning tool for a session: '一发式冷启动定位: session 醒来先调这个, 拿到...的紧凑快照'. It specifies the resource (active pair context snapshot) and distinguishes from manually composing multiple calls (live_pending + snapshot + thread). While it doesn't name a specific sibling, the stated contrast with combining several sibling tools' outputs differentiates it.

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 says when to use: 'session 醒来先调这个' (call this first when session wakes). Provides a concrete exclusion: if brief_etag matches last remembered, skip get_learner_brief. Also notes pair_id defaults to current active pair, and error behavior when pair_id doesn't exist. This is strong usage guidance.

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/sf-shenfeng/learn-shell'

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