list_code_references
Reads the branches, commits and pull requests linked to one work item, or a page of them across a project, each with its kind, state, author, address and the item it belongs to.
Read what code already exists for an item before you write any. Give work_item_id for one item's references (pull requests first, then branches, then commits, the newest first within each), or project_id for a page across the project, the newest first, narrowed by kind (branch, commit or pull_request), state (open, draft, merged, closed or pushed), repository_id or search (words in the ref, the title, the author or the item's key or title). Each row carries ref (the branch name, seven characters of the sha, or # and the number), title, url, author, state, additions and deletions when the host said, the item's reference and work_item_title, and repository_full_name. Before you open a branch, read the item: if a branch or an open pull request is already up, continue it rather than start another. A client guest's token reads none.
Requires ability
The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.
Annotations
It reads and never changes anything.
Arguments
work_item_idstringoptionalUUID of a work item, for its references.
project_idstringoptionalUUID of a project, for a page across its items; read when work_item_id is not sent.
kindstringoptionalNarrow a project page to one kind.
branchcommitpull_requeststatestringoptionalNarrow a project page to one state.
openmergedcloseddraftpushedrepository_idstringoptionalNarrow a project page to one repository.
searchstringoptionalWords the ref, the title, the author or the item must contain.
limitintegeroptionalRows per page, 1 to 100; 50 by default.
pageintegeroptionalThe page, from 1.
What it returns
{ "data": [ { "id": "4d5e6f70-8192-4cad-8e1f-3a4b5c6d7e8f", "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13", "work_item_id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e", "reference": "CRM-142", "work_item_title": "Apply a voucher at checkout", "repository_id": "9e8d7c6b-5a49-4382-a716-05f4e3d2c1b0", "repository_full_name": "zuse-technologies/portal", "kind": "pull_request", "external_id": "42", "ref": "#42", "title": "CRM-142 Apply a voucher at checkout", "url": "https://github.com/zuse-technologies/portal/pull/42", "author": "nimal", "state": "open", "additions": 120, "deletions": 14, "opened_at": "2026-11-02T10:00:00+00:00", "merged_at": null, "closed_at": null, "linked_by": null, "created_at": "2026-11-02T10:00:02+00:00", "updated_at": "2026-11-02T10:00:02+00:00" }, { "id": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d", "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13", "work_item_id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e", "reference": "CRM-142", "work_item_title": "Apply a voucher at checkout", "repository_id": "9e8d7c6b-5a49-4382-a716-05f4e3d2c1b0", "repository_full_name": "zuse-technologies/portal", "kind": "branch", "external_id": "feature/crm-142-voucher", "ref": "feature/crm-142-voucher", "title": null, "url": "https://github.com/zuse-technologies/portal/tree/feature/crm-142-voucher", "author": "nimal", "state": "open", "additions": null, "deletions": null, "opened_at": "2026-11-02T09:00:00+00:00", "merged_at": null, "closed_at": null, "linked_by": null, "created_at": "2026-11-02T09:00:01+00:00", "updated_at": "2026-11-02T09:00:01+00:00" } ], "meta": { "count": 2 }}How it fails
VALIDATION_FAILEDkind or state is not one of the values the response lists.
RESOURCE_NOT_FOUNDunknown work_item_id or project_id, or one outside the token's scope.
FORBIDDENthe token is a client guest's, or the holder may not read the project's items.
TOKEN_MISSING_ABILITYtoken lacks work-item:view-any.
Related
How is this guide?
Last updated on