Bootstrap session context with get_session_context
Goal: fetch a repository’s open milestones and, optionally, a Projects v2
board’s state in one call — the equivalent of what Claude Code’s
session-start.mjs hook injects automatically, for any MCP host that has no
such hook.
Prerequisites
Section titled “Prerequisites”- Read access to the target repository and (if requesting board state) the target project.
-
For milestones only:
{ "owner": "your-org", "repo": "your-repo" } -
For milestones plus board state, add the project fields:
{"owner": "your-org","repo": "your-repo","projectOwnerLogin": "your-org","projectNumber": 1}projectOwnerTypedefaults toorganization; pass"user"for a user-owned project. -
Read the response:
{ openMilestones: [...], projectBoard: {...} | null, projectConfigPath: string | null }.
Verify it worked
Section titled “Verify it worked”openMilestonesmatcheslist_milestonescalled withstate: "open".projectBoardisnullunless you supplied bothprojectOwnerLoginandprojectNumber— supplying only one still returnsnullforprojectBoard, it does not error.- When non-null,
projectBoardhas the same shape asget_project_items’s result. - If
projectBoardcame backnulland you expected board config to be picked up automatically, checkprojectConfigPathfirst:nullthere means the MCP server never found.config/gdlc/config.ymlsearching upward from its own cwd — most often because the server was launched from a directory above your repo (a multi-repo workspace root), which upward search cannot resolve (issue #106 / ADR-0005). Configure the global layer ($XDG_CONFIG_HOME/gdlc/config.yml) instead, or launch from the repo itself.
See also: tool reference.