MCP tools.
15 tools: 7 read and 8 write. This page is generated from the server's own tool list, so it matches what tools/list returns. For setup, see the MCP server guide.
Before you call a tool
The endpoint is https://pinthread.dev/mcp. Send an agent token as Authorization: Bearer ptk_…. The token belongs to one project, so every tool works on that project only.
Read tools work with any token: whoami, list_threads, get_thread, get_attachment, list_events, get_page_context, list_assignees. Write tools need a write token: reply_thread, ask_thread, dismiss_thread, create_thread, resolve_thread, reopen_thread, update_thread, mark_suggestion_applied. A read token that calls a write tool gets a tool error, not a protocol error.
Tool results are JSON text. Every tool takes an optional branch that defaults to shared, except whoami.
Localhost comments
A widget on localhost writes to local unless you set a branch. MCP tools default to shared. Pass branch: "local" to read localhost feedback. status: "all" includes every status within one branch, not every branch.
list_threads({ branch: "local", status: "all" })
get_thread({ thread_id: "THREAD_ID", branch: "local" })If a list is empty, availableBranches names up to 20 other branches with their open thread counts. Pass one as branch. A missing thread error names its branch if the thread exists elsewhere in this project.
Server instructions
On initialize the server sends these instructions to the client:
Read design comments with list_threads and get_page_context. React to new comments with list_events and its cursor. Reply with reply_thread. Ask focused questions with ask_thread when a reviewer must answer. Dismiss with dismiss_thread and a reason only when no code change is needed. Resolve a thread only after the fix is merged and verified.Read tools
whoami
Any token. Show the project, repository, token name and scope (read or write) this connection uses.
No arguments.
list_threads
Any token. List design comment threads for the project, newest activity last. By default it returns every thread that is not resolved. Filter by status, assignee, priority or label. Each thread has stale: true when the page changed after the comment, so check the comment against the current page first. A widget on localhost writes to branch "local"; pass branch to read it. Status "all" includes all statuses in one branch, not all branches. Empty results can include availableBranches with open thread counts and a hint. Accepts level and root like get_thread.
| Argument | Type | Required | Meaning |
|---|---|---|---|
status | unresolved | open | in_progress | needs_review | resolved | dismissed | awaiting_reviewer | all | No | Default unresolved (every thread not resolved). All includes every status in the selected branch only. |
assignee | string | No | Assignee id from list_assignees, or 'me'. |
priority | none | low | medium | high | urgent | No | |
label | string | No | Only threads with this label. |
awaitingReviewer | boolean | No | Only threads waiting for a reviewer, or only those not waiting. |
intent | fix | change | question | approve | No | |
page | string | No | Only threads on this page path, such as /pricing. |
stale | boolean | No | Only threads whose page changed after the comment (true), or only those that did not (false). A thread with no recorded revision is never stale. |
since | number | No | Only threads updated after this Unix time in milliseconds. |
limit | number | No | Maximum threads to return. Default 50, maximum 300. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
level | compact | standard | detailed | forensic | No | Output size: compact, standard (default), detailed or forensic. |
root | string | No | Absolute path of the local checkout. With it, detailed output adds vscode:// and cursor:// links for relative source files. |
get_thread
Any token. Read one thread with every comment, author and reaction. Includes its attachments (log and metadata text inline; screenshots, video and replay as links that expire in 15 minutes) and, for a suggested text edit, a suggestion with old, new and selector. A comment on an open menu, dialog, popover or tooltip also has a ui_state text with the steps that show that UI again. Set level to compact (selector, text, source, comments only), standard (default), detailed or forensic (adds target: key attributes, component, source file:line, editor links and nearby context). A widget on localhost writes to branch "local"; pass branch to read it. A missing thread error names another branch when the thread exists there.
| Argument | Type | Required | Meaning |
|---|---|---|---|
thread_id | string | Yes | Thread id from list_threads. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
level | compact | standard | detailed | forensic | No | Output size: compact, standard (default), detailed or forensic. |
root | string | No | Absolute path of the local checkout. With it, detailed output adds vscode:// and cursor:// links for relative source files. |
get_attachment
Any token. Read one authorized image or screenshot attachment by id as an image content block.
| Argument | Type | Required | Meaning |
|---|---|---|---|
attachment_id | string | Yes | Attachment id to read. |
list_events
Any token. Read new comment activity (new threads and replies) after a cursor, oldest first. Pass the cursor from the last call as `since`; use 'latest' to start from now. Poll this to react to new design comments without re-reading every thread.
| Argument | Type | Required | Meaning |
|---|---|---|---|
since | string | No | Cursor from the previous call, or 'latest'. Omit to read from the start. |
limit | number | No | Maximum events to return. Default 100, maximum 200. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
get_page_context
Any token. Return the open threads on one page, with their anchors, attachments and suggested edits, so you know which elements the comments point at. A comment on several elements lists each one in anchor.targets. Accepts level and root like get_thread. When a page has no open threads, returns openThreads: [] with reason, explanation and a recovery hint, distinguishing an absent page from one where all threads are resolved.
| Argument | Type | Required | Meaning |
|---|---|---|---|
page | string | Yes | Page path, such as /pricing. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
level | compact | standard | detailed | forensic | No | Output size: compact, standard (default), detailed or forensic. |
root | string | No | Absolute path of the local checkout. With it, detailed output adds vscode:// and cursor:// links for relative source files. |
list_assignees
Any token. List who can be assigned a thread: the owner, invited members and agent tokens.
| Argument | Type | Required | Meaning |
|---|---|---|---|
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
Write tools
reply_thread
Write token. Add a reply to a thread as this agent. Needs a write token.
| Argument | Type | Required | Meaning |
|---|---|---|---|
thread_id | string | Yes | Thread id from list_threads. |
body | string | Yes | Reply text, up to 4000 characters. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
idempotencyKey | string | No | Optional retry key. Keep the same key and payload until success. Valid for 24 hours. |
ask_thread
Write token. Ask a focused question attached to this thread and mark it awaiting a reviewer. A reviewer reply clears the marker. Needs a write token.
| Argument | Type | Required | Meaning |
|---|---|---|---|
thread_id | string | Yes | Thread id from list_threads. |
body | string | Yes | Question text, up to 4000 characters. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
dismiss_thread
Write token. Dismiss feedback that needs no code change, with a required reason. Do not dismiss uncertain or unverified work. Needs a write token.
| Argument | Type | Required | Meaning |
|---|---|---|---|
thread_id | string | Yes | Thread id from list_threads. |
reason | string | Yes | Nonblank dismissal reason, up to 500 characters. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
create_thread
Write token. Start a new thread on a page. The anchor says where the comment points. Needs a write token.
| Argument | Type | Required | Meaning |
|---|---|---|---|
page | string | Yes | Page path, such as /pricing. |
body | string | Yes | Comment text, up to 4000 characters. |
anchor | object | Yes | Copy the anchor of an existing thread on the page, or give selector, text, x, y, width, height (0 to 1, relative to the element), pageX, pageY and viewportWidth. Add suggestion {old, new} to propose an exact text edit. Add targets [{selector, text}] (at most 20) when one comment covers several elements. Add layout {kind: "placement" or "rearrange", component, x, y, width, height (0 to 1 of the viewport), viewportHeight, optional viewportWidth (defaults to the anchor's viewportWidth), optional from {x, y, width, height} for a rearrange, wireframe, purpose} for a layout hint. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
intent | fix | change | question | approve | | No |
resolve_thread
Write token. Mark a thread resolved. Needs a write token.
| Argument | Type | Required | Meaning |
|---|---|---|---|
thread_id | string | Yes | Thread id from list_threads. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
idempotencyKey | string | No | Optional retry key. Keep the same key until success. Valid for 24 hours. |
reopen_thread
Write token. Reopen a resolved thread. Needs a write token.
| Argument | Type | Required | Meaning |
|---|---|---|---|
thread_id | string | Yes | Thread id from list_threads. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
update_thread
Write token. Change a thread's status, assignee, priority, labels, dueAt or optional intent (fix, change, question, approve, or null). Status dismissed requires dismissalReason. Use ask_thread to wait for a reviewer. Give only fields you change. Needs a write token.
| Argument | Type | Required | Meaning |
|---|---|---|---|
thread_id | string | Yes | Thread id from list_threads. |
status | open | in_progress | needs_review | resolved | dismissed | No | |
assignee | string | null | No | Assignee id, 'me', or null. |
priority | none | low | medium | high | urgent | No | |
labels | array | No | Replaces all labels. |
dueAt | number | null | No | Due date in Unix milliseconds, or null. |
dismissalReason | string | No | Required when status is dismissed, up to 500 characters. |
intent | fix | change | question | approve | | No | |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
mark_suggestion_applied
Write token. Mark a thread's suggested text edit as applied after you changed the code. Adds a note comment and resolves the thread. Needs a write token.
| Argument | Type | Required | Meaning |
|---|---|---|---|
thread_id | string | Yes | Thread id from list_threads. |
note | string | No | What you changed, up to 1000 characters. |
branch | string | No | Comment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise. |
Next
The HTTP API reference covers the JSON-RPC envelope and the plain REST routes behind these tools.