Skip to main content
Glama

Get project context (call this first)

get_context
Read-onlyIdempotent

Load a session-start briefing of relevant notes, decisions, dead ends, open tasks, and handoffs by passing the working directory and a focus; omit focus to retrieve the full project context.

Instructions

The session-start briefing. Call it first, with cwd and a focus: it answers with what matches -- notes whole, related dead ends, work in progress, anything queued for you -- as text under 8,000 characters, and counts the rest. With no focus, one that matches nothing, or shape:'full', it answers with everything instead, as JSON: standing rules, decisions, dead ends, open questions, open tasks with their linked files and the last handoff. That one is capped: fifty open tasks, three entries per kind per task (one handoff), and a byte budget on every body -- notes, task bodies and log entries -- smaller with a focus. Nothing is truncated: every record keeps its id and head (first line), and a body of null means the budget was already spent, never that the record is empty -- get_task and get_context_note read the rest. open_tasks_omitted/log_omitted count records NOT here; context_omitted/task_bodies_omitted/log_bodies_omitted count records here without a body. focus (one sentence on what this session is for, in both the developer's language and English) spends the budget on what is relevant instead of what is newest; context_ranked_by/log_ranked_by say which you got. Open tasks untouched for 14+ days come back head-only in idle_tasks -- title, status, days idle, last handoff head -- and cost no budget. The whole stays under about 40,000 characters: past that, the live tasks least worth reading come back as a line each in condensed_tasks, in that order, and get_task has the rest (files_omitted counts linked files a line had no room for). summary_missing: true means nobody has said what this repository is: update_project with one or two sentences once you know. A list with nothing in it is left out rather than sent empty. shape:'digest' answers with a plain-text index under max_chars instead -- headlines and ids only, for when the full briefing is too large to read or was saved to a file instead of shown.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoAbsolute working directory, used if project is omitted
focusNoWhat this session is about, in a sentence, written in English AND in the developer's other language if they have one ('add a profile name column / profil adı kolonu ekle'): it is matched word by word and the log may be in either. Keep identifiers as they are. The note and log budgets are spent on what matches it instead of what is newest; it can only move a record up, never drop one.
modelNoYour model id, e.g. 'claude-opus-5'.
shapeNo'digest' returns the briefing as an indexed text under max_chars (default 9500): rules, live tasks with their last handoff, open questions, dead ends and decisions by headline only. 'opening' is what the tool sends by default: what matches `focus`, as text under 8,000 characters, or the full briefing when nothing does. 'full' is everything, as JSON.
projectNoProject slug, name, or any absolute path inside the project
max_charsNoCeiling for shape:'digest', in characters. Ignored for 'full'.
create_if_missingNoRegister a project if the path matches none. Defaults to true for an absolute path; needs `repo_root` or `repo_url` as well.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / anyOf
      Removed value: -[
      -  {
      -    "required": [
      -      "project"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "cwd"
      -    ]
      -  }
      -]
    • changedInput schema / properties / focus / description
      Previous value: -"What this session is about, in a sentence. The note and log budgets are spent on what matches it instead of what is newest; it can only move a record up, never drop one."New value: +"What this session is about, in a sentence, written in English AND in the developer's other language if they have one ('add a profile name column / profil adı kolonu ekle'): it is matched word by word and the log may be in either. Keep identifiers as they are. The note and log budgets are spent on what matches it instead of what is newest; it can only move a record up, never drop one."
    • changedInput schema / properties / shape / description
      Previous value: -"'digest' returns the briefing as an indexed text under max_chars (default 9500): rules, live tasks with their last handoff, open questions, dead ends and decisions by headline only. Default 'full'."New value: +"'digest' returns the briefing as an indexed text under max_chars (default 9500): rules, live tasks with their last handoff, open questions, dead ends and decisions by headline only. 'opening' is what the tool sends by default: what matches `focus`, as text under 8,000 characters, or the full briefing when nothing does. 'full' is everything, as JSON."
    • changedInput schema / properties / shape / enum
      Previous value: -[
      -  "full",
      -  "digest"
      -]New value: +[
      +  "full",
      +  "digest",
      +  "opening"
      +]
  2. Changed2 schema fields changedv0.1.6
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "description": "Ceiling for shape:'digest', in characters. Ignored for 'full'.",
      +  "maximum": 40000,
      +  "minimum": 2000,
      +  "type": "integer"
      +}
    • addedInput schema / properties / shape
      Added value: +{
      +  "description": "'digest' returns the briefing as an indexed text under max_chars (default 9500): rules, live tasks with their last handoff, open questions, dead ends and decisions by headline only. Default 'full'.",
      +  "enum": [
      +    "full",
      +    "digest"
      +  ],
      +  "type": "string"
      +}
  3. First observedv0.1.4

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and idempotentHint; the description adds substantial behavior beyond them — hard caps (50 open tasks, 3 entries per kind, ~40,000 char ceiling), the no-truncation guarantee that every record keeps id/head, the meaning of body: null, the 14-day idle rule, the omitted-vs-bodies-omitted counter distinction, and that empty lists are omitted. The one gap is the `create_if_missing` default, which can register a project on a first call despite readOnlyHint=true; that side effect is left to the schema rather than disclosed here.

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-loaded with the call-it-first instruction in the first sentence, and every sentence carries operative detail rather than filler. It is dense to the point of being a wall of clauses and parenthetical counters, which costs some scannability for an agent parsing it in one pass.

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?

No output schema exists, so the description must describe return shape itself, and it does — enumerating the JSON fields, the text-mode cap, the condensed_tasks/idle_tasks overflow structures, and the summary_missing signal with the follow-up action. For a 7-parameter, multi-mode tool this leaves no material ambiguity about how to call it or what comes back.

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 100%, so the baseline is 3, but the description adds interaction semantics the schema documents only piecewise: focus 'spends the budget on what is relevant instead of what is newest', context_ranked_by/log_ranked_by report which mode was used, and max_chars applies only to digest. This meaningfully clarifies how focus and shape combine rather than restating field-level text.

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?

Opens with a concrete identity ('The session-start briefing') and then specifies exactly what it returns in each mode: focus-matched text under 8,000 chars, or full JSON with standing rules, decisions, dead ends, open questions and open tasks. It distinguishes itself from siblings by naming get_task and get_context_note as the readers for what this tool condenses, and update_project as the fix for summary_missing.

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 instructs 'Call it first, with `cwd` and a `focus`', and states the fallback conditions (no focus, focus matching nothing, shape:'full') that switch behavior. It also routes away from itself when the briefing is too large ('shape:'digest' ... for when the full briefing is too large to read or was saved to a file'), which is a real when-to-use-vs-alternative decision.

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