Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const inputSchema = z.object({

export const changeNodeProps = {
name: 'change_node_props',
title: '修改节点属性',
description:
'Change the props of a node in the current TinyEngine low-code application. Use this when you need to change the props of a node in your application.',
inputSchema: inputSchema.shape,
Expand Down
1 change: 1 addition & 0 deletions packages/canvas/DesignCanvas/src/mcp/tools/delNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const inputSchema = z.object({

export const delNode = {
name: 'del_node',
title: '删除节点',
description:
'Delete a node from the current TinyEngine low-code application. Use this when you need to delete a node from your application.',
inputSchema: inputSchema.shape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const inputSchema = z.object({})

export const getCurrentSelectedNode = {
name: 'get_current_selected_node',
title: '获取当前选中节点',
description:
'Get the current selected node from the current TinyEngine low-code application. Use this when you need to get the current selected node from your application.',
inputSchema: inputSchema.shape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const inputSchema = z.object({})

export const getPageSchema = {
name: 'get_page_schema',
title: '获取页面结构',
description:
'Get current editing page schema from the current TinyEngine low-code application. Use this when you need to get current editing page schema from your application.',
inputSchema: inputSchema.shape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const inputSchema = z.object({

export const queryNodeById = {
name: 'query_node_by_id',
title: '根据ID查询节点',
description:
'Query a node by id from the current TinyEngine low-code application. Use this when you need to query a node by id from your application.',
inputSchema: inputSchema.shape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const inputSchema = z.object({

export const selectSpecificNode = {
name: 'select_specific_node',
title: '选择特定节点',
description:
'Select a specific node from the current TinyEngine low-code application. Use this when you need to select a specific node from your application.',
inputSchema: inputSchema.shape,
Expand Down
1 change: 1 addition & 0 deletions packages/layout/src/mcp/tools/getAllPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const inputSchema = z.object({})

export const getAllPlugins = {
name: 'get_all_plugins',
title: '获取所有插件',
description: 'Get all plugins',
inputSchema: inputSchema.shape,
callback: async (_args: z.infer<typeof inputSchema>) => {
Expand Down
1 change: 1 addition & 0 deletions packages/layout/src/mcp/tools/switchPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const inputSchema = z.object({

export const switchPluginPanel = {
name: 'switch_plugin_panel',
title: '切换插件面板',
description:
'Switch to the current TinyEngine low-code application. Use this when you need to switch to the current TinyEngine low-code application.',
inputSchema: inputSchema.shape,
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/i18n/src/composable/tools/addI18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const outputSchema = createOutputSchema(addI18nDataSchema)

export const addI18n = {
name: 'add_i18n',
title: '新增 I18n 词条',
description:
'Add a new i18n entry to the current TinyEngine low-code application. Use this when you need to add new internationalization translations to your application.',
inputSchema: inputSchema.shape,
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/i18n/src/composable/tools/delI18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const outputSchema = createOutputSchema(delI18nDataSchema)

export const delI18n = {
name: 'delete_i18n',
title: '删除 I18n 词条',
description:
'Delete an existing i18n entry from the current TinyEngine low-code application. Use this when you need to remove internationalization translations.',
inputSchema: inputSchema.shape,
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/i18n/src/composable/tools/getI18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const outputSchema = createOutputSchema(i18nDataSchema)

export const getI18n = {
name: 'get_i18n',
title: '获取 I18n 词条',
description:
'Retrieve i18n entries from the current TinyEngine low-code application. Can get a specific entry by key or all entries if no key is provided.',
inputSchema: inputSchema.shape,
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/i18n/src/composable/tools/updateI18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const outputSchema = createOutputSchema(updateI18nDataSchema)

export const updateI18n = {
name: 'update_i18n',
title: '更新 I18n 词条',
description:
'Update an existing i18n entry in the current TinyEngine low-code application. Use this when you need to modify internationalization translations.',
inputSchema: inputSchema.shape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const inputSchema = z.object({

export const getComponentDetail = {
name: 'get_component_detail',
title: '获取组件详情',
description: 'Get the detail of a component.',
inputSchema: inputSchema.shape,
callback: async (args: z.infer<typeof inputSchema>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const inputSchema = z.object({})

export const getComponentList = {
name: 'get_component_list',
title: '获取可用组件列表',
description: 'Get all components that can be dragged to the canvas in the current low-code platform application.',
inputSchema: inputSchema.shape,
callback: async (_args: z.infer<typeof inputSchema>) => {
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/page/src/mcp/tools/addPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const inputSchema = z.object({
export const addPage = {
name: 'add_page',
label: 'Add Page',
title: '新增页面',
order: 6,
description:
'Add a new page to the current TinyEngine low-code application. Use this when you need to add new page to your application.',
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/page/src/mcp/tools/changePageBasicInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const inputSchema = z.object({
export const changePageBasicInfo = {
name: 'change_page_basic_info',
label: 'Change Page Basic Info',
title: '修改页面基础信息',
order: 8,
description:
'Change a page basic info from the current TinyEngine low-code application. Use this when you need to change a page from your application.',
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/page/src/mcp/tools/delPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const inputSchema = z.object({
export const delPage = {
name: 'del_page',
label: 'Delete Page',
title: '删除页面',
order: 7,
description:
'Delete a page from the current TinyEngine low-code application. Use this when you need to delete a page from your application.',
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/page/src/mcp/tools/editSpecificPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const inputSchema = z.object({

export const editSpecificPage = {
name: 'Edit_page_in_canvas.',
title: '在画布中编辑页面',
order: 9,
description: 'Edit a specific page in canvas. Use this tool when you need to edit some page in canvas.',
inputSchema: inputSchema.shape,
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/page/src/mcp/tools/getPageDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const inputSchema = z.object({
export const getPageDetail = {
name: 'get_page_detail',
label: 'Get Page Detail',
title: '获取页面详情',
order: 8,
description:
'Get a page detail from the current TinyEngine low-code application. Use this when you need to get a page detail from your application.',
Expand Down Expand Up @@ -36,7 +37,7 @@ export const getPageDetail = {
status: 'error',
message: 'Failed to fetch page detail',
data: {
error: error?.message || ''
error: error instanceof Error ? error.message : 'Unknown error occurred'
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/plugins/page/src/mcp/tools/getPageList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const inputSchema = z.object({})
export const getPageList = {
name: 'get_page_list',
label: 'Get Page List',
title: '获取页面列表',
order: 8,
description:
'Get a page list from the current TinyEngine low-code application. Use this when you need to get a page list from your application.',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/robot/src/mcp/useMcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ const updateServerTools = (serverId: string, tools: PluginTool[]) => {
}

const updateEngineTools = async () => {
const tools: Array<{ name: string; description: string; status: string }> =
const tools: Array<{ name: string; description: string; status: string; title: string }> =
(await getMetaApi(META_SERVICE.McpService)?.getToolList?.()) || []
const engineTools = tools.map((tool) => ({
id: tool.name,
name: tool.name,
title: tool.title,
description: tool.description,
enabled: tool.status === 'enabled'
}))
Expand Down