Expand description
The MCP tools and prompts of TeamCraft.
Every tool calls the same services::* functions as the REST API, with
the rights of the signed-in user. Results are compact JSON (item numbers
and revision codes instead of ids) so they fit an assistant’s context;
long lists are capped and flagged with truncated.
Writes only prepare work: a draft change order and its affected revisions, a new change request (which every signed-in user may raise) and comments on one. Submitting, reviewing, releasing, making obsolete and triaging or deciding change requests are not offered – those decisions stay with people.
Structs§
- Args
- Typed access to the
argumentsobject of a tool call. - File
State - A file of a revision as far as the comparison is concerned.
- Line
State - A BOM line as far as the comparison is concerned.
- Snapshot
- What
compareneeds of a revision.
Constants§
- MAX_
BOM_ ROWS - Most rows of an expanded BOM in one result.
- MAX_
LIST - Most entries of other lists in one result.
- MAX_
PREVIEW_ CANDIDATES - Most candidates listed when the search text matches several items.
- MAX_
TEXT_ BYTES - Upper bound for the text of one result; longer output is cut.
Functions§
- call
tools/call: runs a tool and wraps the outcome asCallToolResult.- call_
logged callon behalf of a real user, with the read log of need-to-know groups (services::access_log::record_tool_read): a successful read tool that named an item of a group that logs reads leaves an entry with the channel oflog(MCP client or assistant). A read that cannot be logged is not handed out, like a download.- checked_
viewer_ path - Checks a viewer URL from a tool result before anything shows it: it must
be this server’s 3D viewer page of a file – a relative
/files/<uuid>/previewor the same underpublic_url(same scheme, host and port). Returns the relative path in canonical form; anything else (other hosts,//host, queries, fragments, encodings, other pages) isNone. - compare
- What changed from
oldtonew: attributes, files (matched by name, compared by content hash) and BOM lines (matched by child item). - definitions
tools/list.- definitions_
for tools/listfor a token scope: aread_onlytoken sees the read-only tools only.- diff_
brief - One matched result value of
simulations::compare_results. - exists
- failure
- A failed
CallToolResult: the assistant sees the message and can react. - group_
based - The basis links of one simulation, grouped (the service returns one row per link, ordered by simulation number).
- group_
duplicates - Duplicate contents grouped by SHA-256 (largest first, as returned).
- is_
read_ only - Whether a tool only reads (
falsefor an unknown name). - parse_
item_ ref PRT-000012orPRT-000012/B→ number and optional revision code. Item numbers never contain a slash.- preview_
action - The action hint of a viewer URL.
- prompt
prompts/get: the prompt as one user message.- prompts
prompts/list.- request_
reason - request_
scope - The
scopeargument:mine→ (requested by me, –),assigned→ (–, assigned to me), none → no filter. - request_
status_ filter - The
statusargument oflist_change_requests: a status,open(not finished) orall(default) → (status filter, open only). - success
- A successful
CallToolResult: the value as JSON text and as structured content (non-objects are wrapped in{"result": …}). Output aboveMAX_TEXT_BYTESis cut and the structured copy left out. - viewer_
path - The path of the 3D viewer page of a file (the current version).