MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / assistantToolDefs

Function assistantToolDefs

app/src/AI/ToolDispatcher.cpp:372–427  ·  view source on GitHub ↗

* @brief Returns the snapshot/dataset/workspace tool schemas exposed under the assistant.* prefix. */

Source from the content-addressed store, hash-verified

370 * @brief Returns the snapshot/dataset/workspace tool schemas exposed under the assistant.* prefix.
371 */
372static QVector<detail::AssistantToolDef> assistantToolDefs()
373{
374 const auto scriptProps = scriptPropsBag();
375 return {
376 {QStringLiteral("assistant.snapshot"),
377 QStringLiteral("Assistant-oriented project snapshot with resolved project structure, "
378 "workspaces, and a compact identity guide. Prefer this over chaining "
379 "project.snapshot + list calls."),
380 snapshotInputSchema()},
381 {QStringLiteral("assistant.dataset.resolve"),
382 QStringLiteral("Resolve a dataset from human input. Accepts path, title, or uniqueId and "
383 "returns the canonical dataset object plus identity hints."),
384 datasetInputSchema()},
385 {QStringLiteral("assistant.workspace.resolve"),
386 QStringLiteral("Resolve a workspace by title or id and return the canonical workspace row."),
387 workspaceInputSchema()},
388 {QStringLiteral("assistant.workspace.plan"),
389 QStringLiteral("Read the current project and suggest workspace tile additions using "
390 "compatible widget slugs. This is read-only planning."),
391 planInputSchema()},
392 {QStringLiteral("assistant.workspace.addTile"),
393 QStringLiteral("High-level workspace mutation: resolves workspace/group/dataset, enables "
394 "the matching dataset option when needed, patches optional ranges, turns "
395 "customize mode on, adds the widget, then verifies the workspace."),
396 tileInputSchema()},
397 {QStringLiteral("assistant.script.dryRun"),
398 QStringLiteral("Validate script code on the right Serial Studio surface. Routes frame "
399 "parsers, transforms, painters, and end-to-end parser+transform checks to "
400 "the matching dry-run endpoint and returns actionable reference hints."),
401 makeObjectSchema(scriptProps, QJsonArray{QStringLiteral("kind")})},
402 {QStringLiteral("assistant.script.apply"),
403 QStringLiteral("Dry-run script code first, then apply it to the correct project target. "
404 "Use for frame parsers, dataset transforms, and painter widgets."),
405 makeObjectSchema(scriptProps, QJsonArray{QStringLiteral("kind"), QStringLiteral("code")})},
406 {QStringLiteral("assistant.project.bulkApply"),
407 QStringLiteral("Validate and execute a project.batch mutation, rejecting nested batches and "
408 "summarizing per-op failures so models do not loop individual edits."),
409 bulkInputSchema()},
410 {QStringLiteral("assistant.checkpoint"),
411 QStringLiteral("Force an immediate project snapshot to disk and return its absolute path. "
412 "Call BEFORE any multi-step risky edit so you can roll back atomically with "
413 "assistant.restore if any subsequent step fails."),
414 checkpointInputSchema()},
415 {QStringLiteral("assistant.restore"),
416 QStringLiteral("Restore a previously taken checkpoint, replacing the current project state. "
417 "Provide one of: path (absolute path), timestamp (ISO string from "
418 "assistant.listCheckpoints), or label. Returns reverseSnapshotPath so the "
419 "restore itself is reversible."),
420 restoreInputSchema()},
421 {QStringLiteral("assistant.listCheckpoints"),
422 QStringLiteral("List the rolling backup snapshots for the currently loaded project, newest "
423 "first. Returns {checkpoints:[{path,timestamp,sizeBytes,label}],count,"
424 "directory}."),
425 listCheckpointsInputSchema()},
426 };
427}
428
429/**

Callers 5

assistantToolDescriptionFunction · 0.85
availableToolsMethod · 0.85
listCommandsMethod · 0.85
listCategoriesMethod · 0.85
canonicalToolNameMethod · 0.85

Calls 11

scriptPropsBagFunction · 0.85
snapshotInputSchemaFunction · 0.85
datasetInputSchemaFunction · 0.85
workspaceInputSchemaFunction · 0.85
planInputSchemaFunction · 0.85
tileInputSchemaFunction · 0.85
makeObjectSchemaFunction · 0.85
bulkInputSchemaFunction · 0.85
checkpointInputSchemaFunction · 0.85
restoreInputSchemaFunction · 0.85

Tested by

no test coverage detected