* @brief Appends meta.listCategories, meta.snapshot, meta.listCommands tools. */
| 2066 | * @brief Appends meta.listCategories, meta.snapshot, meta.listCommands tools. |
| 2067 | */ |
| 2068 | static void appendBasicMetaTools(QJsonArray& out) |
| 2069 | { |
| 2070 | { |
| 2071 | QJsonObject schema; |
| 2072 | schema[QStringLiteral("type")] = QStringLiteral("object"); |
| 2073 | schema[QStringLiteral("properties")] = QJsonObject(); |
| 2074 | out.append( |
| 2075 | makeMetaTool(QStringLiteral("meta.listCategories"), |
| 2076 | QStringLiteral("List the top-level command scopes (project, io, console, " |
| 2077 | "consoleExport, csvExport, csvPlayer, mdf4Export, mdf4Player, " |
| 2078 | "controlscript, scripts, dashboard, ui, sessions, licensing, " |
| 2079 | "notifications, extensions, assistant, fs, meta) with one-line " |
| 2080 | "descriptions and command counts. " |
| 2081 | "Call this FIRST when you need to know what is even possible -- " |
| 2082 | "it's much smaller than meta.listCommands and tells you which " |
| 2083 | "prefix to drill into next."), |
| 2084 | schema)); |
| 2085 | } |
| 2086 | |
| 2087 | { |
| 2088 | QJsonObject schema; |
| 2089 | schema[QStringLiteral("type")] = QStringLiteral("object"); |
| 2090 | schema[QStringLiteral("properties")] = QJsonObject(); |
| 2091 | out.append( |
| 2092 | makeMetaTool(QStringLiteral("meta.snapshot"), |
| 2093 | QStringLiteral("One-shot composite of every readable status endpoint " |
| 2094 | "(project.getStatus, io.getStatus, dashboard.getStatus, " |
| 2095 | "console.getConfig, csvExport/Player.getStatus, " |
| 2096 | "project.mqtt.publisher/subscriber.getStatus, " |
| 2097 | "sessions.getStatus, " |
| 2098 | "mdf4Export/Player.getStatus, licensing.getStatus, " |
| 2099 | "notifications.getUnreadCount). Use when you want a global " |
| 2100 | "picture without making 10+ separate calls."), |
| 2101 | schema)); |
| 2102 | } |
| 2103 | |
| 2104 | { |
| 2105 | QJsonObject schema; |
| 2106 | schema[QStringLiteral("type")] = QStringLiteral("object"); |
| 2107 | QJsonObject props; |
| 2108 | props[QStringLiteral("prefix")] = |
| 2109 | stringProp(QStringLiteral("Optional dotted prefix filter, e.g. \"project.\" or \"io.\".")); |
| 2110 | QJsonObject offsetProp; |
| 2111 | offsetProp[QStringLiteral("type")] = QStringLiteral("integer"); |
| 2112 | offsetProp[QStringLiteral("description")] = |
| 2113 | QStringLiteral("Skip this many entries before returning results (default 0). Use the " |
| 2114 | "nextOffset from a previous reply to page through long lists."); |
| 2115 | offsetProp[QStringLiteral("minimum")] = 0; |
| 2116 | props[QStringLiteral("offset")] = offsetProp; |
| 2117 | QJsonObject limitProp; |
| 2118 | limitProp[QStringLiteral("type")] = QStringLiteral("integer"); |
| 2119 | limitProp[QStringLiteral("description")] = |
| 2120 | QStringLiteral("Max entries to return (default 0 = all). Combine with offset when a " |
| 2121 | "result reports truncated:true."); |
| 2122 | limitProp[QStringLiteral("minimum")] = 0; |
| 2123 | props[QStringLiteral("limit")] = limitProp; |
| 2124 | schema[QStringLiteral("properties")] = props; |
| 2125 | out.append(makeMetaTool(QStringLiteral("meta.listCommands"), |
no test coverage detected