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

Function fsToolDefs

app/src/AI/ToolDispatcher.cpp:522–552  ·  view source on GitHub ↗

* @brief Returns the fs.* virtual-tool catalog exposed to assistant providers. */

Source from the content-addressed store, hash-verified

520 * @brief Returns the fs.* virtual-tool catalog exposed to assistant providers.
521 */
522static QVector<detail::AssistantToolDef> fsToolDefs()
523{
524 return {
525 { QStringLiteral("fs.list"),
526 QStringLiteral("List files and folders in the Serial Studio workspace folder (or a "
527 "dragged-in directory). Read-only."),
528 fsListInputSchema() },
529 { QStringLiteral("fs.read"),
530 QStringLiteral("Read a text file from the workspace folder (or a dragged-in path). "
531 "Paged: pass offset/limit and follow nextOffset for large files. Refuses "
532 "binary files."),
533 fsReadInputSchema() },
534 {QStringLiteral("fs.search"),
535 QStringLiteral("Search file contents across the workspace folder and dragged-in paths "
536 "(grep-like, literal or regex). Read-only."),
537 fsSearchInputSchema()},
538 { QStringLiteral("fs.write"),
539 QStringLiteral("Write a UTF-8 text file inside the workspace 'AI/' subfolder, replacing "
540 "it. Use for notes, summaries, generated configs/exports. Cannot write "
541 "outside AI/."),
542 fsWriteInputSchema() },
543 {QStringLiteral("fs.append"),
544 QStringLiteral("Append UTF-8 text to a file inside the workspace 'AI/' subfolder, "
545 "creating it if needed. Cannot write outside AI/."),
546 fsWriteInputSchema() },
547 {QStringLiteral("fs.delete"),
548 QStringLiteral("Delete a file or empty directory inside the workspace 'AI/' subfolder. "
549 "Always asks the user first."),
550 fsDeleteInputSchema()},
551 };
552}
553
554/**
555 * @brief Returns true when `name` targets an fs.* sandboxed filesystem tool.

Callers 5

fsToolDescriptionFunction · 0.85
availableToolsMethod · 0.85
listCommandsMethod · 0.85
listCategoriesMethod · 0.85
canonicalToolNameMethod · 0.85

Calls 5

fsListInputSchemaFunction · 0.85
fsReadInputSchemaFunction · 0.85
fsSearchInputSchemaFunction · 0.85
fsWriteInputSchemaFunction · 0.85
fsDeleteInputSchemaFunction · 0.85

Tested by

no test coverage detected