Document & Navigation
用于检查和浏览文档与页面的工具
此分类共 5 个工具。
get_document_info
Section titled “get_document_info”Get the document name, current page, and list of all pages.
无参数
JSON Schema
{} 返回值 仅供参考 — 不包含在工具定义中
| Field | Type | Description |
|---|---|---|
name | string | Document name |
currentPageId | string | Active page ID |
pages | object[] | |
↳ id | string | |
↳ name | string |
示例返回
{
"name": "Design System",
"currentPageId": "0:1",
"pages": [
{
"id": "0:1",
"name": "Components"
},
{
"id": "5:0",
"name": "Icons"
}
]
} 返回值 JSON Schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Document name"
},
"currentPageId": {
"type": "string",
"description": "Active page ID"
},
"pages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
},
"required": [
"name",
"currentPageId",
"pages"
]
} get_current_page
Section titled “get_current_page”Get the current page info and its top-level children.
无参数
JSON Schema
{} 返回值 仅供参考 — 不包含在工具定义中
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
children | object[] | Top-level children on the page |
↳ id | string | Node ID |
↳ name | string | |
↳ type | string |
示例返回
{
"id": "0:1",
"name": "Components",
"children": [
{
"id": "1:2",
"name": "Button",
"type": "COMPONENT_SET"
}
]
} 返回值 JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"children": {
"type": "array",
"description": "Top-level children on the page",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Node ID"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
},
"required": [
"id",
"name",
"children"
]
} set_current_page
Section titled “set_current_page”Switch to a different page. Provide either pageId or pageName.
| Parameter | Type | Required | Description |
|---|---|---|---|
pageId | string | ✗ | The page ID to switch to |
pageName | string | ✗ | The page name (case-insensitive, partial match) |
JSON Schema
{
"type": "object",
"properties": {
"pageId": {
"description": "The page ID to switch to",
"type": "string"
},
"pageName": {
"description": "The page name (case-insensitive, partial match)",
"type": "string"
}
}
} 返回值 仅供参考 — 不包含在工具定义中
| Field | Type | Description |
|---|---|---|
id | string | |
name | string |
示例返回
{
"id": "5:0",
"name": "Icons"
} 返回值 JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
} create_page
Section titled “create_page” create
Create a new page in the document
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✗ | Name for the new page (default: 'New Page') |
JSON Schema
{
"type": "object",
"properties": {
"name": {
"description": "Name for the new page (default: 'New Page')",
"type": "string"
}
}
} 返回值 仅供参考 — 不包含在工具定义中
| Field | Type | Description |
|---|---|---|
id | string | New page ID |
示例返回
{
"id": "12:0"
} 返回值 JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "New page ID"
}
},
"required": [
"id"
]
} rename_page
Section titled “rename_page” edit
Rename a page. Defaults to current page if no pageId given.
| Parameter | Type | Required | Description |
|---|---|---|---|
newName | string | ✓ | New name for the page |
pageId | string | ✗ | Page ID (default: current page) |
JSON Schema
{
"type": "object",
"properties": {
"newName": {
"type": "string",
"description": "New name for the page"
},
"pageId": {
"description": "Page ID (default: current page)",
"type": "string"
}
},
"required": [
"newName"
]
} 返回值 仅供参考 — 不包含在工具定义中
无参数
示例返回
"ok" 返回值 JSON Schema
{
"type": "string",
"const": "ok"
}