feat(mcp): complete action results and invocation examples
Document result shapes and practical calls for all built-in actions, including prerequisites, streaming workflows and compatibility limits. Preserve existing interfaces and execution behavior, and verify the catalog against action validation and representative responses.
This commit is contained in:
27 files changed
+14140
-33
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -66,7 +66,8 @@ const DOCS_TOOLS: Tool[] = [
|
||||
},
|
||||
{
|
||||
name: 'get_action',
|
||||
description: '获取 action 文档、参数 JSON Schema、约束和返回类型。',
|
||||
description:
|
||||
'获取 action 文档、参数与返回数据 JSON Schema、约束和调用示例。示例中的标识和路径需替换;流式返回结构描述单帧数据。',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: { name: { type: 'string', description: 'action 名(接受别名)' } },
|
||||
|
||||
@@ -26,8 +26,15 @@ export interface CatalogAction {
|
||||
category?: string;
|
||||
summary?: string;
|
||||
returns?: string;
|
||||
/** JSON Schema for the action's `data` payload (absent when undocumented). */
|
||||
/** Successful OneBot `data`, or one successful stream frame's `data`.
|
||||
* Does not describe the envelope or MCP's aggregated stream result. */
|
||||
returnsSchema?: Record<string, unknown>;
|
||||
/** Illustrative OneBot params; identifiers/paths must be replaced before use. */
|
||||
examples?: ReadonlyArray<{
|
||||
summary: string;
|
||||
params: Record<string, unknown>;
|
||||
notes?: string;
|
||||
}>;
|
||||
/** True only for pure data-fetch actions (no side effects). Drives the
|
||||
* read/write tool routing: read-only → query_action, else → invoke_action.
|
||||
* Classified at the source spec by what the action's `run` actually does. */
|
||||
|
||||
Reference in new issue
Block a user