@xano/developer-mcp 1.0.27 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +1 -1
  2. package/dist/api_docs/format.d.ts +5 -0
  3. package/dist/api_docs/format.js +171 -0
  4. package/dist/api_docs/index.d.ts +52 -0
  5. package/dist/api_docs/index.js +111 -0
  6. package/dist/api_docs/topics/agent.d.ts +2 -0
  7. package/dist/api_docs/topics/agent.js +142 -0
  8. package/dist/api_docs/topics/api.d.ts +2 -0
  9. package/dist/api_docs/topics/api.js +176 -0
  10. package/dist/api_docs/topics/apigroup.d.ts +2 -0
  11. package/dist/api_docs/topics/apigroup.js +124 -0
  12. package/dist/api_docs/topics/authentication.d.ts +2 -0
  13. package/dist/api_docs/topics/authentication.js +61 -0
  14. package/dist/api_docs/topics/branch.d.ts +2 -0
  15. package/dist/api_docs/topics/branch.js +73 -0
  16. package/dist/api_docs/topics/file.d.ts +2 -0
  17. package/dist/api_docs/topics/file.js +70 -0
  18. package/dist/api_docs/topics/function.d.ts +2 -0
  19. package/dist/api_docs/topics/function.js +164 -0
  20. package/dist/api_docs/topics/history.d.ts +2 -0
  21. package/dist/api_docs/topics/history.js +149 -0
  22. package/dist/api_docs/topics/mcp_server.d.ts +2 -0
  23. package/dist/api_docs/topics/mcp_server.js +139 -0
  24. package/dist/api_docs/topics/middleware.d.ts +2 -0
  25. package/dist/api_docs/topics/middleware.js +156 -0
  26. package/dist/api_docs/topics/realtime.d.ts +2 -0
  27. package/dist/api_docs/topics/realtime.js +112 -0
  28. package/dist/api_docs/topics/start.d.ts +2 -0
  29. package/dist/api_docs/topics/start.js +107 -0
  30. package/dist/api_docs/topics/table.d.ts +2 -0
  31. package/dist/api_docs/topics/table.js +195 -0
  32. package/dist/api_docs/topics/task.d.ts +2 -0
  33. package/dist/api_docs/topics/task.js +165 -0
  34. package/dist/api_docs/topics/tool.d.ts +2 -0
  35. package/dist/api_docs/topics/tool.js +150 -0
  36. package/dist/api_docs/topics/workflows.d.ts +2 -0
  37. package/dist/api_docs/topics/workflows.js +131 -0
  38. package/dist/api_docs/topics/workspace.d.ts +2 -0
  39. package/dist/api_docs/topics/workspace.js +153 -0
  40. package/dist/api_docs/types.d.ts +79 -0
  41. package/dist/api_docs/types.js +4 -0
  42. package/dist/meta_api_docs/topics/branch.js +154 -18
  43. package/dist/meta_api_docs/topics/workspace.js +45 -2
  44. package/dist/templates/init-workspace.d.ts +10 -0
  45. package/dist/templates/init-workspace.js +278 -0
  46. package/dist/templates/xanoscript-index.d.ts +11 -0
  47. package/dist/templates/xanoscript-index.js +72 -0
  48. package/dist/xanoscript_docs/README.md +3 -13
  49. package/dist/xanoscript_docs/ephemeral.md +330 -0
  50. package/dist/xanoscript_docs/functions.md +0 -21
  51. package/dist/xanoscript_docs/integrations.md +0 -10
  52. package/dist/xanoscript_docs/performance.md +1 -10
  53. package/dist/xanoscript_docs/realtime.md +1 -48
  54. package/dist/xanoscript_docs/security.md +2 -0
  55. package/dist/xanoscript_docs/tools.md +2 -21
  56. package/dist/xanoscript_docs/triggers.md +2 -27
  57. package/dist/xanoscript_docs_auto/README.md +119 -0
  58. package/dist/xanoscript_docs_auto/agents.md +446 -0
  59. package/dist/xanoscript_docs_auto/apis.md +517 -0
  60. package/dist/xanoscript_docs_auto/control-flow.md +543 -0
  61. package/dist/xanoscript_docs_auto/database.md +551 -0
  62. package/dist/xanoscript_docs_auto/debugging.md +527 -0
  63. package/dist/xanoscript_docs_auto/filters.md +464 -0
  64. package/dist/xanoscript_docs_auto/functions.md +431 -0
  65. package/dist/xanoscript_docs_auto/integrations.md +657 -0
  66. package/dist/xanoscript_docs_auto/mcp-servers.md +408 -0
  67. package/dist/xanoscript_docs_auto/operators.md +368 -0
  68. package/dist/xanoscript_docs_auto/syntax.md +287 -0
  69. package/dist/xanoscript_docs_auto/tables.md +447 -0
  70. package/dist/xanoscript_docs_auto/tasks.md +479 -0
  71. package/dist/xanoscript_docs_auto/testing.md +574 -0
  72. package/dist/xanoscript_docs_auto/tools.md +485 -0
  73. package/dist/xanoscript_docs_auto/triggers.md +595 -0
  74. package/dist/xanoscript_docs_auto/types.md +323 -0
  75. package/dist/xanoscript_docs_auto/variables.md +462 -0
  76. package/dist/xanoscript_docs_auto/version.json +5 -0
  77. package/package.json +1 -1
@@ -0,0 +1,124 @@
1
+ export const apigroupDoc = {
2
+ topic: "apigroup",
3
+ title: "API Group Management",
4
+ description: `API Groups are collections of related REST endpoints. They provide logical grouping, shared authentication, and generate Swagger/OpenAPI documentation.
5
+
6
+ ## Key Concepts
7
+ - Each workspace has one or more API groups
8
+ - API groups contain individual API endpoints
9
+ - Groups can have shared authentication settings
10
+ - Each group generates its own OpenAPI/Swagger spec`,
11
+ ai_hints: `- List existing API groups before creating new ones
12
+ - Use meaningful names (e.g., "public", "admin", "webhooks")
13
+ - Security settings apply to all endpoints in the group
14
+ - Get OpenAPI spec to understand available endpoints in a group`,
15
+ endpoints: [
16
+ {
17
+ method: "GET",
18
+ path: "/workspace/{workspace_id}/apigroup",
19
+ tool_name: "listApiGroups",
20
+ description: "List all API groups in a workspace with filtering and sorting.",
21
+ parameters: [
22
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
23
+ { name: "page", type: "integer", default: 1, description: "Page number" },
24
+ { name: "per_page", type: "integer", default: 50, description: "Items per page" },
25
+ { name: "search", type: "string", description: "Search by name" },
26
+ { name: "sort", type: "string", enum: ["id", "name", "created_at"], default: "created_at", description: "Sort field" },
27
+ { name: "order", type: "string", enum: ["asc", "desc"], default: "desc", description: "Sort direction" }
28
+ ]
29
+ },
30
+ {
31
+ method: "GET",
32
+ path: "/workspace/{workspace_id}/apigroup/{apigroup_id}",
33
+ tool_name: "getApiGroup",
34
+ description: "Get details of a specific API group.",
35
+ parameters: [
36
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
37
+ { name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
38
+ ]
39
+ },
40
+ {
41
+ method: "POST",
42
+ path: "/workspace/{workspace_id}/apigroup",
43
+ tool_name: "createApiGroup",
44
+ description: "Create a new API group in the workspace.",
45
+ parameters: [
46
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
47
+ ],
48
+ request_body: {
49
+ type: "application/json",
50
+ properties: {
51
+ name: { type: "string", description: "API group name", required: true },
52
+ description: { type: "string", description: "API group description" }
53
+ }
54
+ }
55
+ },
56
+ {
57
+ method: "PUT",
58
+ path: "/workspace/{workspace_id}/apigroup/{apigroup_id}",
59
+ tool_name: "updateApiGroup",
60
+ description: "Update an existing API group.",
61
+ parameters: [
62
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
63
+ { name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
64
+ ],
65
+ request_body: {
66
+ type: "application/json",
67
+ properties: {
68
+ name: { type: "string", description: "API group name" },
69
+ description: { type: "string", description: "API group description" }
70
+ }
71
+ }
72
+ },
73
+ {
74
+ method: "DELETE",
75
+ path: "/workspace/{workspace_id}/apigroup/{apigroup_id}",
76
+ tool_name: "deleteApiGroup",
77
+ description: "Delete an API group and all its endpoints.",
78
+ parameters: [
79
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
80
+ { name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
81
+ ]
82
+ },
83
+ {
84
+ method: "GET",
85
+ path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/openapi",
86
+ tool_name: "getApiGroupOpenAPI",
87
+ description: "Get OpenAPI v3 specification for this API group's endpoints.",
88
+ parameters: [
89
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
90
+ { name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
91
+ ]
92
+ },
93
+ {
94
+ method: "PUT",
95
+ path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/security",
96
+ tool_name: "updateApiGroupSecurity",
97
+ description: "Update security/authentication settings for the API group.",
98
+ parameters: [
99
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
100
+ { name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
101
+ ],
102
+ request_body: {
103
+ type: "application/json",
104
+ properties: {
105
+ guid: { type: "string", description: "Security group GUID" }
106
+ }
107
+ }
108
+ }
109
+ ],
110
+ schemas: {
111
+ ApiGroup: {
112
+ type: "object",
113
+ properties: {
114
+ id: { type: "integer" },
115
+ name: { type: "string" },
116
+ description: { type: "string" },
117
+ swagger: { type: "boolean", description: "Whether Swagger docs are enabled" },
118
+ created_at: { type: "string", format: "date-time" },
119
+ updated_at: { type: "string", format: "date-time" }
120
+ }
121
+ }
122
+ },
123
+ related_topics: ["api", "workspace", "authentication"]
124
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const authenticationDoc: TopicDoc;
@@ -0,0 +1,61 @@
1
+ export const authenticationDoc = {
2
+ topic: "authentication",
3
+ title: "Authentication & Authorization",
4
+ description: `The Xano Meta API uses Access Tokens for authentication and a scope-based system for authorization.
5
+
6
+ ## Access Tokens
7
+ Create access tokens in the Xano dashboard under Settings > Access Tokens.
8
+
9
+ Include the token in all requests:
10
+ \`\`\`
11
+ Authorization: Bearer <your-access-token>
12
+ \`\`\`
13
+
14
+ ## Scope System
15
+ Access is controlled through hierarchical scopes:
16
+
17
+ | Scope | Values | Description |
18
+ |-------|--------|-------------|
19
+ | \`instance:workspace\` | read, update, create | Workspace-level permissions |
20
+ | \`workspace:api\` | read, create, update | API management |
21
+ | \`workspace:requesthistory\` | read | Audit/history access |
22
+ | \`workspace:file\` | read, create | File management |
23
+ | \`workspace:action:export\` | enabled | Export functionality |
24
+
25
+ ## Role Types
26
+ - **explore**: Limited free/explore tier role
27
+ - **paid**: Full access to all features
28
+
29
+ ## Current User
30
+ Get the authenticated user's info:
31
+ \`\`\`
32
+ GET /auth/me
33
+ \`\`\`
34
+
35
+ Returns: id, name, email, and extras (including role and workspace access).`,
36
+ ai_hints: `- Always include Authorization header with Bearer token
37
+ - Check user role before attempting paid-only operations (tasks, some exports)
38
+ - Scope errors return 403 - check if token has required permissions
39
+ - Use \`GET /auth/me\` to verify token and see accessible workspaces`,
40
+ endpoints: [
41
+ {
42
+ method: "GET",
43
+ path: "/auth/me",
44
+ tool_name: "getAuthMe",
45
+ description: "Get the authenticated user's information including ID, name, email, and role.",
46
+ response: {
47
+ type: "object",
48
+ properties: {
49
+ id: { type: "integer" },
50
+ name: { type: "string" },
51
+ email: { type: "string" },
52
+ extras: {
53
+ type: "object",
54
+ description: "Contains instance.membership with role and workspace access"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ],
60
+ related_topics: ["start", "workspace"]
61
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const branchDoc: TopicDoc;
@@ -0,0 +1,73 @@
1
+ export const branchDoc = {
2
+ topic: "branch",
3
+ title: "Branch Management",
4
+ description: `Branches provide environment separation for your Xano workspace. Use branches for development, staging, and production environments.
5
+
6
+ ## Key Concepts
7
+ - Default branch is "v1" (cannot be deleted)
8
+ - Branches contain separate databases and configurations
9
+ - One branch is designated as "live" (production)
10
+ - Useful for safe development without affecting production
11
+ - Import schema to create new branches from exports
12
+
13
+ ## Common Workflow
14
+ 1. Create a development branch
15
+ 2. Make and test changes on dev branch
16
+ 3. Export schema from dev
17
+ 4. Import schema to production branch`,
18
+ ai_hints: `- Cannot delete the "v1" branch or the live branch
19
+ - Use branch parameter in list endpoints to filter by branch
20
+ - Import schema creates a new branch from export file
21
+ - Always verify branch before making changes (dev vs prod)
22
+ - Export before major changes for backup`,
23
+ endpoints: [
24
+ {
25
+ method: "GET",
26
+ path: "/workspace/{workspace_id}/branch",
27
+ tool_name: "listBranches",
28
+ description: "List all branches in a workspace including the default 'v1' branch.",
29
+ parameters: [
30
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
31
+ ]
32
+ },
33
+ {
34
+ method: "DELETE",
35
+ path: "/workspace/{workspace_id}/branch/{branch_label}",
36
+ tool_name: "deleteBranch",
37
+ description: "Delete a branch. Cannot delete 'v1' or the live branch.",
38
+ parameters: [
39
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
40
+ { name: "branch_label", type: "string", required: true, in: "path", description: "Branch label/name to delete" }
41
+ ]
42
+ }
43
+ ],
44
+ schemas: {
45
+ Branch: {
46
+ type: "object",
47
+ properties: {
48
+ label: { type: "string", description: "Branch identifier (e.g., 'v1', 'dev')" },
49
+ is_live: { type: "boolean", description: "Whether this is the live/production branch" },
50
+ created_at: { type: "string", format: "date-time" }
51
+ }
52
+ }
53
+ },
54
+ examples: [
55
+ {
56
+ title: "List all branches",
57
+ description: "Get all branches in a workspace",
58
+ request: {
59
+ method: "GET",
60
+ path: "/workspace/1/branch",
61
+ headers: { "Authorization": "Bearer <token>" }
62
+ },
63
+ response: {
64
+ items: [
65
+ { label: "v1", is_live: true },
66
+ { label: "dev", is_live: false },
67
+ { label: "staging", is_live: false }
68
+ ]
69
+ }
70
+ }
71
+ ],
72
+ related_topics: ["workspace", "table"]
73
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const fileDoc: TopicDoc;
@@ -0,0 +1,70 @@
1
+ export const fileDoc = {
2
+ topic: "file",
3
+ title: "File Storage Management",
4
+ description: `Files in Xano provide storage for images, videos, audio, and other attachments used by your application.
5
+
6
+ ## Key Concepts
7
+ - Files are stored in Xano's managed storage
8
+ - Support for images, videos, audio, and general attachments
9
+ - Files can be public or private access
10
+ - Use in database blob fields or API responses
11
+ - Search and filter by name, type
12
+
13
+ ## File Types
14
+ - **image**: PNG, JPG, GIF, WebP, etc.
15
+ - **video**: MP4, WebM, MOV, etc.
16
+ - **audio**: MP3, WAV, OGG, etc.
17
+ - **attachment**: PDF, DOC, ZIP, and other files`,
18
+ ai_hints: `- Files must be uploaded via multipart/form-data
19
+ - Use public access for CDN-served static assets
20
+ - Use private access for sensitive documents
21
+ - Reference files in table blob fields by ID or path
22
+ - Large file uploads may need chunked upload strategy`,
23
+ endpoints: [
24
+ {
25
+ method: "GET",
26
+ path: "/workspace/{workspace_id}/file",
27
+ tool_name: "listFiles",
28
+ description: "List all files in a workspace with filtering.",
29
+ parameters: [
30
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
31
+ { name: "page", type: "integer", default: 1, description: "Page number" },
32
+ { name: "per_page", type: "integer", default: 50, description: "Items per page" },
33
+ { name: "search", type: "string", description: "Search by filename" },
34
+ { name: "type", type: "string", enum: ["image", "video", "audio", "attachment"], description: "Filter by file type" }
35
+ ]
36
+ },
37
+ {
38
+ method: "POST",
39
+ path: "/workspace/{workspace_id}/file",
40
+ tool_name: "uploadFile",
41
+ description: "Upload a file to the workspace.",
42
+ parameters: [
43
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
44
+ ],
45
+ request_body: {
46
+ type: "multipart/form-data",
47
+ properties: {
48
+ file: { type: "file", description: "File to upload", required: true },
49
+ access: { type: "string", description: "Access level: public or private" }
50
+ }
51
+ }
52
+ }
53
+ ],
54
+ schemas: {
55
+ File: {
56
+ type: "object",
57
+ properties: {
58
+ id: { type: "integer" },
59
+ name: { type: "string" },
60
+ path: { type: "string" },
61
+ type: { type: "string", enum: ["image", "video", "audio", "attachment"] },
62
+ size: { type: "integer", description: "File size in bytes" },
63
+ access: { type: "string", enum: ["public", "private"] },
64
+ url: { type: "string", description: "Public URL if accessible" },
65
+ created_at: { type: "string", format: "date-time" }
66
+ }
67
+ }
68
+ },
69
+ related_topics: ["table", "api"]
70
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const functionDoc: TopicDoc;
@@ -0,0 +1,164 @@
1
+ export const functionDoc = {
2
+ topic: "function",
3
+ title: "Reusable Function Management",
4
+ description: `Functions are reusable pieces of logic that can be called from APIs, tasks, other functions, or anywhere in your Xano workspace.
5
+
6
+ ## Key Concepts
7
+ - Functions encapsulate reusable business logic
8
+ - Can be called from APIs, tasks, other functions, agents, tools
9
+ - Support input parameters and return values
10
+ - Can be cached for performance
11
+ - Support draft/publish workflow
12
+
13
+ ## Caching Options
14
+ Functions can cache results based on:
15
+ - TTL (time-to-live)
16
+ - Input parameters
17
+ - Authenticated user
18
+ - Datasource
19
+ - IP address
20
+ - Headers
21
+ - Environment variables`,
22
+ ai_hints: `- Functions are reusable across APIs and tasks
23
+ - Use \`include_xanoscript=true\` to see implementation
24
+ - Draft changes won't affect production until published
25
+ - Caching can significantly improve performance for expensive operations
26
+ - Check existing functions before creating duplicates`,
27
+ endpoints: [
28
+ {
29
+ method: "GET",
30
+ path: "/workspace/{workspace_id}/function",
31
+ tool_name: "listFunctions",
32
+ description: "List all functions in a workspace.",
33
+ parameters: [
34
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
35
+ { name: "page", type: "integer", default: 1, description: "Page number" },
36
+ { name: "per_page", type: "integer", default: 50, description: "Items per page" },
37
+ { name: "search", type: "string", description: "Search by function name" },
38
+ { name: "sort", type: "string", enum: ["id", "name", "created_at"], default: "created_at", description: "Sort field" },
39
+ { name: "order", type: "string", enum: ["asc", "desc"], default: "desc", description: "Sort direction" },
40
+ { name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript code" },
41
+ { name: "include_draft", type: "boolean", default: false, description: "Include draft versions" },
42
+ { name: "branch", type: "string", description: "Filter by branch name" }
43
+ ]
44
+ },
45
+ {
46
+ method: "GET",
47
+ path: "/workspace/{workspace_id}/function/{function_id}",
48
+ tool_name: "getFunction",
49
+ description: "Get details of a specific function.",
50
+ parameters: [
51
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
52
+ { name: "function_id", type: "integer", required: true, in: "path", description: "Function ID" },
53
+ { name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript code" },
54
+ { name: "include_draft", type: "boolean", default: false, description: "Include draft version" }
55
+ ]
56
+ },
57
+ {
58
+ method: "POST",
59
+ path: "/workspace/{workspace_id}/function",
60
+ tool_name: "createFunction",
61
+ description: "Create a new reusable function.",
62
+ parameters: [
63
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
64
+ ],
65
+ request_body: {
66
+ type: "application/json",
67
+ properties: {
68
+ name: { type: "string", description: "Function name", required: true },
69
+ description: { type: "string", description: "Function description" },
70
+ xanoscript: { type: "string", description: "XanoScript function definition", required: true }
71
+ }
72
+ },
73
+ example: {
74
+ method: "POST",
75
+ path: "/workspace/1/function",
76
+ body: {
77
+ name: "calculate_total",
78
+ description: "Calculate order total with tax",
79
+ xanoscript: `function calculate_total {
80
+ input {
81
+ decimal subtotal
82
+ decimal tax_rate = 0.08
83
+ }
84
+ stack {
85
+ var $tax {
86
+ value = $input.subtotal * $input.tax_rate
87
+ }
88
+ var $total {
89
+ value = $input.subtotal + $tax
90
+ }
91
+ }
92
+ response = $total
93
+ }`
94
+ }
95
+ }
96
+ },
97
+ {
98
+ method: "PUT",
99
+ path: "/workspace/{workspace_id}/function/{function_id}",
100
+ tool_name: "updateFunction",
101
+ description: "Update an existing function.",
102
+ parameters: [
103
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
104
+ { name: "function_id", type: "integer", required: true, in: "path", description: "Function ID" },
105
+ { name: "publish", type: "boolean", default: true, description: "Publish changes immediately (false saves as draft)" }
106
+ ],
107
+ request_body: {
108
+ type: "application/json",
109
+ properties: {
110
+ name: { type: "string", description: "Function name" },
111
+ description: { type: "string", description: "Function description" },
112
+ xanoscript: { type: "string", description: "XanoScript function definition" }
113
+ }
114
+ }
115
+ },
116
+ {
117
+ method: "DELETE",
118
+ path: "/workspace/{workspace_id}/function/{function_id}",
119
+ tool_name: "deleteFunction",
120
+ description: "Delete a function. Ensure no other resources depend on it.",
121
+ parameters: [
122
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
123
+ { name: "function_id", type: "integer", required: true, in: "path", description: "Function ID" }
124
+ ]
125
+ },
126
+ {
127
+ method: "PUT",
128
+ path: "/workspace/{workspace_id}/function/{function_id}/security",
129
+ tool_name: "updateFunctionSecurity",
130
+ description: "Update security settings for the function.",
131
+ parameters: [
132
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
133
+ { name: "function_id", type: "integer", required: true, in: "path", description: "Function ID" }
134
+ ],
135
+ request_body: {
136
+ type: "application/json",
137
+ properties: {
138
+ guid: { type: "string", description: "Security group GUID" }
139
+ }
140
+ }
141
+ }
142
+ ],
143
+ schemas: {
144
+ Function: {
145
+ type: "object",
146
+ properties: {
147
+ id: { type: "integer" },
148
+ name: { type: "string" },
149
+ description: { type: "string" },
150
+ xanoscript: { type: "string", description: "Only included if include_xanoscript=true" },
151
+ cache: {
152
+ type: "object",
153
+ properties: {
154
+ enabled: { type: "boolean" },
155
+ ttl: { type: "integer", description: "Cache TTL in seconds" }
156
+ }
157
+ },
158
+ created_at: { type: "string", format: "date-time" },
159
+ updated_at: { type: "string", format: "date-time" }
160
+ }
161
+ }
162
+ },
163
+ related_topics: ["api", "task", "tool"]
164
+ };
@@ -0,0 +1,2 @@
1
+ import type { TopicDoc } from "../types.js";
2
+ export declare const historyDoc: TopicDoc;
@@ -0,0 +1,149 @@
1
+ export const historyDoc = {
2
+ topic: "history",
3
+ title: "Request & Execution History",
4
+ description: `History endpoints provide audit logs for API requests and background executions. Use for debugging, monitoring, and compliance.
5
+
6
+ ## Available History Types
7
+ - **Request History**: All API requests with timing and responses
8
+ - **Function History**: Function execution logs
9
+ - **Task History**: Scheduled task execution logs
10
+ - **Middleware History**: Middleware execution logs
11
+ - **Tool History**: Agent tool execution logs
12
+ - **Trigger History**: Event trigger execution logs
13
+
14
+ ## Common Use Cases
15
+ - Debugging failed requests
16
+ - Performance monitoring
17
+ - Audit compliance
18
+ - Error tracking
19
+ - Usage analytics`,
20
+ ai_hints: `- Use request history to debug API issues
21
+ - Filter by status to find errors (4xx, 5xx)
22
+ - Use branch filter to separate dev/prod logs
23
+ - Include payload for full request/response data
24
+ - History is limited to recent requests (not permanent storage)`,
25
+ endpoints: [
26
+ {
27
+ method: "GET",
28
+ path: "/workspace/{workspace_id}/request_history",
29
+ tool_name: "getRequestHistory",
30
+ description: "Get API request history with pagination.",
31
+ parameters: [
32
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
33
+ { name: "page", type: "integer", default: 1, description: "Page number" },
34
+ { name: "per_page", type: "integer", default: 50, description: "Items per page (max 500)" },
35
+ { name: "branch", type: "string", description: "Filter by branch name" },
36
+ { name: "api_id", type: "integer", description: "Filter by API endpoint ID" },
37
+ { name: "include_payload", type: "boolean", default: false, description: "Include request/response payloads" }
38
+ ]
39
+ },
40
+ {
41
+ method: "POST",
42
+ path: "/workspace/{workspace_id}/request_history/search",
43
+ tool_name: "searchRequestHistory",
44
+ description: "Search request history with advanced filters.",
45
+ parameters: [
46
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
47
+ ],
48
+ request_body: {
49
+ type: "application/json",
50
+ properties: {
51
+ branch: { type: "string", description: "Filter by branch" },
52
+ api_id: { type: "integer", description: "Filter by API ID" },
53
+ status: { type: "array", description: "Filter by status codes (e.g., [200, 201])" },
54
+ verb: { type: "array", description: "Filter by HTTP methods (e.g., ['GET', 'POST'])" },
55
+ from_date: { type: "string", description: "Start date (ISO format)" },
56
+ to_date: { type: "string", description: "End date (ISO format)" }
57
+ }
58
+ }
59
+ },
60
+ {
61
+ method: "GET",
62
+ path: "/workspace/{workspace_id}/function_history",
63
+ tool_name: "getFunctionHistory",
64
+ description: "Get function execution history.",
65
+ parameters: [
66
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
67
+ { name: "function_id", type: "integer", description: "Filter by function ID" },
68
+ { name: "page", type: "integer", default: 1, description: "Page number" },
69
+ { name: "per_page", type: "integer", default: 50, description: "Items per page" }
70
+ ]
71
+ },
72
+ {
73
+ method: "GET",
74
+ path: "/workspace/{workspace_id}/task_history",
75
+ tool_name: "getTaskHistory",
76
+ description: "Get scheduled task execution history.",
77
+ parameters: [
78
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
79
+ { name: "task_id", type: "integer", description: "Filter by task ID" },
80
+ { name: "page", type: "integer", default: 1, description: "Page number" },
81
+ { name: "per_page", type: "integer", default: 50, description: "Items per page" }
82
+ ]
83
+ },
84
+ {
85
+ method: "GET",
86
+ path: "/workspace/{workspace_id}/middleware_history",
87
+ tool_name: "getMiddlewareHistory",
88
+ description: "Get middleware execution history.",
89
+ parameters: [
90
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
91
+ { name: "middleware_id", type: "integer", description: "Filter by middleware ID" },
92
+ { name: "page", type: "integer", default: 1, description: "Page number" },
93
+ { name: "per_page", type: "integer", default: 50, description: "Items per page" }
94
+ ]
95
+ },
96
+ {
97
+ method: "GET",
98
+ path: "/workspace/{workspace_id}/tool_history",
99
+ tool_name: "getToolHistory",
100
+ description: "Get agent tool execution history.",
101
+ parameters: [
102
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
103
+ { name: "tool_id", type: "integer", description: "Filter by tool ID" },
104
+ { name: "page", type: "integer", default: 1, description: "Page number" },
105
+ { name: "per_page", type: "integer", default: 50, description: "Items per page" }
106
+ ]
107
+ },
108
+ {
109
+ method: "GET",
110
+ path: "/workspace/{workspace_id}/trigger_history",
111
+ tool_name: "getTriggerHistory",
112
+ description: "Get trigger execution history.",
113
+ parameters: [
114
+ { name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
115
+ { name: "page", type: "integer", default: 1, description: "Page number" },
116
+ { name: "per_page", type: "integer", default: 50, description: "Items per page" }
117
+ ]
118
+ }
119
+ ],
120
+ schemas: {
121
+ RequestHistoryItem: {
122
+ type: "object",
123
+ properties: {
124
+ id: { type: "integer" },
125
+ api_id: { type: "integer" },
126
+ verb: { type: "string" },
127
+ path: { type: "string" },
128
+ status: { type: "integer" },
129
+ duration_ms: { type: "integer" },
130
+ branch: { type: "string" },
131
+ request_payload: { type: "object", description: "Only if include_payload=true" },
132
+ response_payload: { type: "object", description: "Only if include_payload=true" },
133
+ created_at: { type: "string", format: "date-time" }
134
+ }
135
+ },
136
+ ExecutionHistoryItem: {
137
+ type: "object",
138
+ properties: {
139
+ id: { type: "integer" },
140
+ resource_id: { type: "integer" },
141
+ status: { type: "string", enum: ["success", "error"] },
142
+ duration_ms: { type: "integer" },
143
+ error: { type: "string" },
144
+ created_at: { type: "string", format: "date-time" }
145
+ }
146
+ }
147
+ },
148
+ related_topics: ["api", "function", "task"]
149
+ };