MCPcopy
hub / github.com/BuilderIO/agent-native / createProgressToolEntries

Function createProgressToolEntries

packages/core/src/progress/actions.ts:24–169  ·  view source on GitHub ↗
(
  getCurrentUser: () => string,
)

Source from the content-addressed store, hash-verified

22}
23
24export function createProgressToolEntries(
25 getCurrentUser: () => string,
26): Record<string, ActionEntry> {
27 return {
28 "manage-progress": {
29 tool: {
30 description: `Manage long-running task progress visible to the user. Use this whenever a task will take more than a few seconds so the user can watch status in the runs tray.
31
32Actions:
33"start" — Begin tracking a new task. Returns a runId to pass to subsequent calls. Params: title (required), step (optional initial step text), metadataJson (optional JSON string with link/thread/artifact info).
34"update" — Report progress on a running task. Call frequently during long loops. Params: runId (required), percent (optional 0–100), step (optional current step text). Omitted fields stay unchanged.
35"complete" — Mark a task as finished. Params: runId (required), status (required: "succeeded" | "failed" | "cancelled"), step (optional final step text). Pairs well with \`notify\` to tell the user the outcome.
36"list" — List the user's recent runs. Use when the user asks "what is still running" or "what did you do earlier". Params: active (optional boolean, filter to in-progress only), limit (optional number, default 20, max 200).`,
37 parameters: {
38 type: "object" as const,
39 properties: {
40 action: {
41 type: "string",
42 enum: ["start", "update", "complete", "list"],
43 description:
44 'The operation to perform: "start" a new run, "update" progress, "complete" a run, or "list" recent runs.',
45 },
46 title: {
47 type: "string",
48 description:
49 '[start] Short human-readable title, e.g. "Triage 128 unread emails".',
50 },
51 step: {
52 type: "string",
53 description:
54 '[start/update/complete] Step description, e.g. "Fetching inbox" or "Drafting reply 23/100".',
55 },
56 metadataJson: {
57 type: "string",
58 description:
59 "[start] Optional JSON metadata: link, thread id, artifact path, etc.",
60 },
61 runId: {
62 type: "string",
63 description:
64 '[update/complete] The id returned by a "start" action.',
65 },
66 percent: {
67 type: "number",
68 description:
69 "[update] Progress 0–100. Omit if the task has no known upper bound.",
70 },
71 status: {
72 type: "string",
73 enum: ["succeeded", "failed", "cancelled"],
74 description: "[complete] Terminal status for the run.",
75 },
76 active: {
77 type: "boolean",
78 description:
79 "[list] When true, only return runs still in progress.",
80 },
81 limit: {

Callers 2

progress.spec.tsFile · 0.85
createAgentChatPluginFunction · 0.85

Calls 5

updateRunProgressFunction · 0.85
completeRunFunction · 0.85
listRunsFunction · 0.85
startRunFunction · 0.70
parseLimitFunction · 0.70

Tested by

no test coverage detected