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.

ArgumentTypeRequiredMeaning
statusunresolved | open | in_progress | needs_review | resolved | dismissed | awaiting_reviewer | allNoDefault unresolved (every thread not resolved). All includes every status in the selected branch only.
assigneestringNoAssignee id from list_assignees, or 'me'.
prioritynone | low | medium | high | urgentNo
labelstringNoOnly threads with this label.
awaitingReviewerbooleanNoOnly threads waiting for a reviewer, or only those not waiting.
intentfix | change | question | approveNo
pagestringNoOnly threads on this page path, such as /pricing.
stalebooleanNoOnly threads whose page changed after the comment (true), or only those that did not (false). A thread with no recorded revision is never stale.
sincenumberNoOnly threads updated after this Unix time in milliseconds.
limitnumberNoMaximum threads to return. Default 50, maximum 300.
branchstringNoComment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise.
levelcompact | standard | detailed | forensicNoOutput size: compact, standard (default), detailed or forensic.
rootstringNoAbsolute 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.

ArgumentTypeRequiredMeaning
thread_idstringYesThread id from list_threads.
branchstringNoComment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise.
levelcompact | standard | detailed | forensicNoOutput size: compact, standard (default), detailed or forensic.
rootstringNoAbsolute 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.

ArgumentTypeRequiredMeaning
attachment_idstringYesAttachment 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.

ArgumentTypeRequiredMeaning
sincestringNoCursor from the previous call, or 'latest'. Omit to read from the start.
limitnumberNoMaximum events to return. Default 100, maximum 200.
branchstringNoComment 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.

ArgumentTypeRequiredMeaning
pagestringYesPage path, such as /pricing.
branchstringNoComment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise.
levelcompact | standard | detailed | forensicNoOutput size: compact, standard (default), detailed or forensic.
rootstringNoAbsolute 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.

ArgumentTypeRequiredMeaning
branchstringNoComment 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.

ArgumentTypeRequiredMeaning
thread_idstringYesThread id from list_threads.
bodystringYesReply text, up to 4000 characters.
branchstringNoComment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise.
idempotencyKeystringNoOptional 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.

ArgumentTypeRequiredMeaning
thread_idstringYesThread id from list_threads.
bodystringYesQuestion text, up to 4000 characters.
branchstringNoComment 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.

ArgumentTypeRequiredMeaning
thread_idstringYesThread id from list_threads.
reasonstringYesNonblank dismissal reason, up to 500 characters.
branchstringNoComment 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.

ArgumentTypeRequiredMeaning
pagestringYesPage path, such as /pricing.
bodystringYesComment text, up to 4000 characters.
anchorobjectYesCopy 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.
branchstringNoComment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise.
intentfix | change | question | approve | No

resolve_thread

Write token. Mark a thread resolved. Needs a write token.

ArgumentTypeRequiredMeaning
thread_idstringYesThread id from list_threads.
branchstringNoComment scope. Defaults to "shared". A widget on localhost writes to "local" unless configured otherwise.
idempotencyKeystringNoOptional retry key. Keep the same key until success. Valid for 24 hours.

reopen_thread

Write token. Reopen a resolved thread. Needs a write token.

ArgumentTypeRequiredMeaning
thread_idstringYesThread id from list_threads.
branchstringNoComment 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.

ArgumentTypeRequiredMeaning
thread_idstringYesThread id from list_threads.
statusopen | in_progress | needs_review | resolved | dismissedNo
assigneestring | nullNoAssignee id, 'me', or null.
prioritynone | low | medium | high | urgentNo
labelsarrayNoReplaces all labels.
dueAtnumber | nullNoDue date in Unix milliseconds, or null.
dismissalReasonstringNoRequired when status is dismissed, up to 500 characters.
intentfix | change | question | approve | No
branchstringNoComment 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.

ArgumentTypeRequiredMeaning
thread_idstringYesThread id from list_threads.
notestringNoWhat you changed, up to 1000 characters.
branchstringNoComment 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.