Skip to content

chore: add title property for mcp tools#1584

Merged
hexqi merged 1 commit intoopentiny:release/v2.8.xfrom
chilingling:chore/addTitleProperty
Aug 18, 2025
Merged

chore: add title property for mcp tools#1584
hexqi merged 1 commit intoopentiny:release/v2.8.xfrom
chilingling:chore/addTitleProperty

Conversation

@chilingling
Copy link
Copy Markdown
Member

@chilingling chilingling commented Aug 18, 2025

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Built its own designer, fully self-validated

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Background and solution

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • New Features

    • Added localized display titles for tools across Canvas, Layout, I18n, Materials, and Page, improving readability in tool lists and panels.
    • Enhanced deletion tool with UI hints (destructive/read-only/idempotent/open-world) to better communicate action intent.
    • Propagated tool titles into the robot engine’s tool list so users see consistent labels across the app.
  • Bug Fixes

    • Improved error messaging when fetching page details to provide clearer feedback on failures.

@github-actions github-actions Bot added chore release merge to release/ branch, before release period labels Aug 18, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 18, 2025

Walkthrough

Adds a localized title field to multiple MCP tool descriptors across canvas, layout, i18n, materials, and page plugins. One tool (delNode) gains additional annotations metadata. Robot tool mapping now propagates title to engine tools. Minor error-handling message refinement in getPageDetail; no other behavioral changes.

Changes

Cohort / File(s) Summary of changes
Canvas tools — add title metadata
packages/canvas/DesignCanvas/src/mcp/tools/changeNodeProps.ts, .../delNode.ts, .../getCurrentSelectedNode.ts, .../getPageSchema.ts, .../queryNodeById.ts, .../selectSpecificNode.ts
Added top-level title to each tool. In delNode.ts, also added annotations fields (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) without changing logic.
Layout tools — add title metadata
packages/layout/src/mcp/tools/getAllPlugins.ts, .../switchPlugin.ts
Added top-level title to each exported tool object; no logic changes.
i18n tools — add title metadata
packages/plugins/i18n/src/composable/tools/addI18n.ts, .../delI18n.ts, .../getI18n.ts, .../updateI18n.ts
Added top-level title to each tool; no changes to schemas or callbacks.
Materials tools — add title metadata
packages/plugins/materials/src/mcp/tools/getComponentDetail.ts, .../getComponentList.ts
Added top-level title; behavior unchanged.
Page tools — add title metadata
packages/plugins/page/src/mcp/tools/addPage.ts, .../changePageBasicInfo.ts, .../delPage.ts, .../editSpecificPage.ts, .../getPageList.ts
Added top-level title to each tool; no logic changes.
Page tool — error handling tweak + title
packages/plugins/page/src/mcp/tools/getPageDetail.ts
Added title. Adjusted catch block to use error instanceof Error ? error.message : 'Unknown error occurred'.
Robot — propagate title to engine tools
packages/plugins/robot/src/mcp/useMcp.ts
Extended tools mapping/type to include title; passes through to engineTools. No other control-flow changes.

Sequence Diagram(s)

sequenceDiagram
  participant UI as UI
  participant MCP as MCP Tool List
  participant Robot as robot/useMcp
  participant Engine as Engine Tools

  UI->>MCP: getToolList()
  MCP-->>UI: tools[{ name, description, title, ... }]
  UI->>Robot: updateEngineTools(tools)
  Robot->>Engine: map to engineTools with title
  Engine-->>UI: tools available with title metadata
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A nibble of titles in every nook,
I stamped them neat in the toolbook.
One error tamed, now messages right,
Robot whispers titles into the night.
Hop, hop—metadata aligned—
Components and pages, all neatly signed. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🔭 Outside diff range comments (1)
packages/plugins/i18n/src/composable/tools/updateI18n.ts (1)

41-54: Validation logic never rejects missing translations

The intent (comment on Line 41) is to require at least one of zh_CN or en_US, but the current schema allows both to be absent and safeParse will still succeed. This path will never hit the error branch.

Replace the block with a direct check against the destructured values.

Apply this diff:

-    // 验证至少有一个翻译字段
-    const translationValidation = z
-      .object({
-        zh_CN: z.string().optional(),
-        en_US: z.string().optional()
-      })
-      .safeParse(args)
-
-    if (!translationValidation.success) {
-      // 直接返回验证错误,已经符合新的结构化格式
-      return createErrorResponse(
-        'Invalid translation fields',
-        'At least one translation (zh_CN or en_US) must be provided'
-      )
-    }
+    // 验证至少有一个翻译字段
+    if (zh_CN === undefined && en_US === undefined) {
+      return createErrorResponse(
+        'Invalid translation fields',
+        'At least one translation (zh_CN or en_US) must be provided'
+      )
+    }
🧹 Nitpick comments (22)
packages/plugins/page/src/mcp/tools/getPageList.ts (1)

15-16: Avoid shadowing the exported constant name with a local variable.

Inside the callback, const { getPageList } = usePage() shadows the exported getPageList object. Alias the destructured method to improve readability and prevent confusion.

-    const { getPageList } = usePage()
-    const [firstGroup, secondGroup] = await getPageList()
+    const { getPageList: fetchPageList } = usePage()
+    const [firstGroup, secondGroup] = await fetchPageList()
packages/canvas/DesignCanvas/src/mcp/tools/changeNodeProps.ts (1)

16-23: Deduplicate title: it appears both top-level and in annotations.

You now have title at the top level and in annotations.title. Keeping two sources risks divergence. Suggest centralizing the literal.

-  title: '修改节点属性',
+  title: TITLE,
@@
-  annotations: {
-    title: '修改节点属性', // 人性化标题
+  annotations: {
+    title: TITLE, // 人性化标题

Add a shared constant near the top of the file:

// near imports
const TITLE = '修改节点属性'
packages/plugins/page/src/mcp/tools/editSpecificPage.ts (1)

9-9: Normalize tool name (optional): snake_case and no trailing dot.

Current name: 'Edit_page_in_canvas.' is inconsistent (capital E, trailing period). If this identifier is externally referenced, changing it is breaking—otherwise consider normalizing.

-  name: 'Edit_page_in_canvas.',
+  name: 'edit_page_in_canvas',
packages/plugins/i18n/src/composable/tools/updateI18n.ts (1)

31-37: Clarify which title is meant for UI display (duplication with annotations.title)

You now have:

  • top-level title: '更新 I18n 词条' (CN)
  • annotations.title: 'Update I18n Entry' (EN)

If both are rendered by different consumers, that’s fine. Otherwise, consider converging on a single source or documenting which one the UI should use to avoid inconsistent labels.

packages/plugins/page/src/mcp/tools/changePageBasicInfo.ts (2)

19-19: Good addition of title metadata

Adds a localized UI label consistent with the rest of the PR. Note this object also has label (EN) and title (CN); ensure downstream consumers consistently prefer one to avoid UI inconsistency.


30-41: Add isError flag to error response for parity with other tools

Other tools (e.g., getPageDetail) mark error payloads with isError: true on the content item. Consider aligning for consistent handling by consumers.

Apply this diff:

-      return {
-        content: [
-          {
-            type: 'text',
-            text: JSON.stringify({
-              status: 'error',
-              message: error
-            })
-          }
-        ]
-      }
+      return {
+        content: [
+          {
+            isError: true,
+            type: 'text',
+            text: JSON.stringify({
+              status: 'error',
+              message: error
+            })
+          }
+        ]
+      }
packages/layout/src/mcp/tools/getAllPlugins.ts (1)

12-13: Avoid shadowing the exported constant name inside callback

Destructuring getAllPlugins into a local with the same name as the exported constant can be confusing. Rename the local binding.

Apply this diff:

-    const { getAllPlugins } = useLayout()
-    const plugins = await getAllPlugins()
+    const { getAllPlugins: fetchAllPlugins } = useLayout()
+    const plugins = await fetchAllPlugins()
packages/layout/src/mcp/tools/switchPlugin.ts (3)

4-7: Schema currently requires pluginId even when operation === 'close'

If the intent is to allow close without a pluginId, make pluginId optional in the schema and validate the dependency in the callback. This avoids forcing callers to pass a dummy string.

Apply this diff:

-const inputSchema = z.object({
-  pluginId: z.string().describe('The id of the plugin to operate.'),
-  operation: z.enum(['open', 'close']).describe('The operation to perform on the plugin.')
-})
+const inputSchema = z.object({
+  pluginId: z.string().optional().describe('The id of the plugin to operate. Required when operation is "open".'),
+  operation: z.enum(['open', 'close']).describe('The operation to perform on the plugin.')
+})

Follow-up callback guard suggested in the next comment.


19-23: Guard against open without pluginId and avoid treating it as close

Currently, an 'open' operation with a missing/empty pluginId falls into the else branch and closes the panel. Provide an explicit error instead.

Apply this diff:

-    if (operation === 'open' && pluginId) {
-      await activePlugin(pluginId)
-    } else {
-      await closePlugin()
-    }
+    if (operation === 'open') {
+      if (!pluginId) {
+        return {
+          content: [
+            {
+              isError: true,
+              type: 'text',
+              text: JSON.stringify({
+                status: 'error',
+                message: 'pluginId is required when operation is "open"'
+              })
+            }
+          ]
+        }
+      }
+      await activePlugin(pluginId)
+    } else {
+      await closePlugin()
+    }

12-14: Wording tweak for description (clarity)

The sentence repeats and doesn’t mention opening/closing. Minor copy edit for clarity.

Apply this diff:

-  description:
-    'Switch to the current TinyEngine low-code application. Use this when you need to switch to the current TinyEngine low-code application.',
+  description:
+    'Open or close a plugin panel in the current TinyEngine low-code application.',
packages/plugins/page/src/mcp/tools/getPageDetail.ts (1)

11-11: Title metadata addition looks good

Adds a localized title consistent with other page tools. With both label (EN) and title (CN) present, ensure the UI consistently prefers the intended property.

packages/canvas/DesignCanvas/src/mcp/tools/queryNodeById.ts (1)

10-10: Avoid duplicating title in both top-level and annotations

You now have title at the top-level and also annotations.title. This can drift over time and cause inconsistent UI labeling.

Consider keeping the top-level title as the single source of truth and removing the duplicate in annotations:

   annotations: {
-    title: '根据ID查询节点', // 人性化标题
     readOnlyHint: true, // 只读操作,不会修改任何状态
     openWorldHint: false // 不与外部世界交互,只在 TinyEngine 内部操作
   },

Also applies to: 15-19

packages/plugins/i18n/src/composable/tools/delI18n.ts (1)

21-21: Unify display text language between title and annotations.title

Top-level title is Chinese, while annotations.title is English. Mixing languages in the same tool definition can lead to inconsistent UI.

If annotations.title is still consumed downstream, align it with the new top-level title:

-    title: 'Delete I18n Entry',
+    // 与顶层 title 保持一致,避免显示不一致
+    title: '删除 I18n 词条',

Alternatively, if only the top-level title is used for display now, remove annotations.title to avoid duplication.

Also applies to: 27-27

packages/plugins/page/src/mcp/tools/delPage.ts (1)

11-11: Title added — check for label/title divergence

Good to see title added. Note the existing label: 'Delete Page' is English while title is Chinese. If both are surfaced somewhere, this creates inconsistent UI.

  • If label is deprecated, consider removing it (or marking clearly as legacy) to avoid confusion.
  • If label is still used, align it with title to maintain a consistent language, e.g.:
-  label: 'Delete Page',
+  label: '删除页面',

Please confirm whether label is still referenced in the engine/robot UI. If not, we can open a follow-up PR to standardize on title only.

packages/plugins/robot/src/mcp/useMcp.ts (1)

65-73: Make title optional and provide a safe fallback to avoid undefined UI labels

Some tools may not yet define title; mapping without a fallback can surface undefined in the UI. Also widen typing to reflect reality and reduce brittleness.

Apply:

-  const tools: Array<{ name: string; description: string; status: string; title: 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,
+    // Prefer explicit title; fall back to name to ensure a non-empty label
+    title: tool.title || tool.name,
     description: tool.description,
     enabled: tool.status === 'enabled'
   }))

As a follow-up, ensure PluginTool (from @opentiny/tiny-robot) tolerates a title field or that extra fields are harmless at call sites.

packages/plugins/i18n/src/composable/tools/getI18n.ts (1)

26-33: Align annotation.title language
The top-level title is in Chinese while annotations.title remains in English, which may lead to inconsistent UI labels. Please update annotations.title to match the top-level title.

• File: packages/plugins/i18n/src/composable/tools/getI18n.ts
Lines: ~26–33

Suggested diff:

   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,
   outputSchema: outputSchema.shape, // 使用 Zod 版本的统一输出结构
   annotations: {
-    title: 'Get I18n Entries',
+    title: '获取 I18n 词条',
     readOnlyHint: true,
     openWorldHint: false
   },
packages/plugins/i18n/src/composable/tools/addI18n.ts (1)

25-33: Title addition is good; align annotations.title to prevent mixed-language labels

Top-level title is Chinese; annotations.title is English. Align to avoid inconsistent UI.

Apply this diff:

 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,
   outputSchema: outputSchema.shape, // 使用 Zod 版本的统一输出结构
   annotations: {
-    title: 'Add I18n Entry',
+    title: '新增 I18n 词条',
     readOnlyHint: false,
     destructiveHint: false,
     idempotentHint: true,
     openWorldHint: false
   },

I can sweep all i18n tools to standardize titles if you’d like a quick follow-up PR.

packages/canvas/DesignCanvas/src/mcp/tools/delNode.ts (5)

15-21: Annotations are helpful; de-duplicate the title to a single source of truth

Good use of annotations. To avoid drift between the top-level title and annotations.title, define the label once and reference it in both places.

Apply this diff within this file:

-  title: '删除节点',
+  title: TITLE,
-    title: '删除节点', // 人性化标题
+    title: TITLE, // 人性化标题

Add this near the imports (outside the selected ranges):

const TITLE = '删除节点' as const

5-5: Harden input validation for id

Prevent empty strings to avoid ambiguous lookups.

-  id: z.string().describe('The id of the node to delete.')
+  id: z.string().min(1, 'ID cannot be empty').describe('The id of the node to delete.')

53-58: Return JSON content instead of stringified text for consistency

You return structured JSON on error but a stringified JSON on success. Unify to type: 'json' to simplify client handling.

-      content: [
-        {
-          type: 'text',
-          text: JSON.stringify(res)
-        }
-      ]
+      content: [
+        {
+          type: 'json',
+          value: res
+        }
+      ]

40-44: Surface runtime failures from operateNode

If operateNode can throw (e.g., internal errors), wrap it to return a structured error instead of failing the tool execution.

-    useCanvas().operateNode({
-      type: 'delete',
-      id
-    })
+    try {
+      useCanvas().operateNode({
+        type: 'delete',
+        id
+      })
+    } catch (err) {
+      return {
+        content: [
+          {
+            type: 'json',
+            value: {
+              status: 'error',
+              message: (err as Error).message || 'Failed to delete node.'
+            }
+          }
+        ]
+      }
+    }

33-34: Language consistency: error/success messages vs. Chinese titles

Titles are Chinese, messages are English. Consider localizing messages (or using i18n) for a consistent UX.

Example (Chinese):

-              message: 'Node not found, please check the id is correct.'
+              message: '未找到节点,请检查 ID 是否正确。'
-      message: `Node deleted successfully`,
+      message: '节点删除成功',

Also applies to: 47-47

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 61bee59 and dc2a561.

📒 Files selected for processing (21)
  • packages/canvas/DesignCanvas/src/mcp/tools/changeNodeProps.ts (1 hunks)
  • packages/canvas/DesignCanvas/src/mcp/tools/delNode.ts (1 hunks)
  • packages/canvas/DesignCanvas/src/mcp/tools/getCurrentSelectedNode.ts (1 hunks)
  • packages/canvas/DesignCanvas/src/mcp/tools/getPageSchema.ts (1 hunks)
  • packages/canvas/DesignCanvas/src/mcp/tools/queryNodeById.ts (1 hunks)
  • packages/canvas/DesignCanvas/src/mcp/tools/selectSpecificNode.ts (1 hunks)
  • packages/layout/src/mcp/tools/getAllPlugins.ts (1 hunks)
  • packages/layout/src/mcp/tools/switchPlugin.ts (1 hunks)
  • packages/plugins/i18n/src/composable/tools/addI18n.ts (1 hunks)
  • packages/plugins/i18n/src/composable/tools/delI18n.ts (1 hunks)
  • packages/plugins/i18n/src/composable/tools/getI18n.ts (1 hunks)
  • packages/plugins/i18n/src/composable/tools/updateI18n.ts (1 hunks)
  • packages/plugins/materials/src/mcp/tools/getComponentDetail.ts (1 hunks)
  • packages/plugins/materials/src/mcp/tools/getComponentList.ts (1 hunks)
  • packages/plugins/page/src/mcp/tools/addPage.ts (1 hunks)
  • packages/plugins/page/src/mcp/tools/changePageBasicInfo.ts (1 hunks)
  • packages/plugins/page/src/mcp/tools/delPage.ts (1 hunks)
  • packages/plugins/page/src/mcp/tools/editSpecificPage.ts (1 hunks)
  • packages/plugins/page/src/mcp/tools/getPageDetail.ts (2 hunks)
  • packages/plugins/page/src/mcp/tools/getPageList.ts (1 hunks)
  • packages/plugins/robot/src/mcp/useMcp.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/plugins/robot/src/mcp/useMcp.ts (2)
packages/register/src/common.ts (1)
  • getMetaApi (20-30)
packages/register/src/constants.ts (1)
  • META_SERVICE (1-23)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: push-check
🔇 Additional comments (15)
packages/plugins/page/src/mcp/tools/getPageList.ts (2)

9-9: Title metadata addition looks good and aligns with PR intent.

No behavioral change; the field is consistent with other tools in this PR.


6-12: Title field propagation verified – no further changes needed

The title property is defined on all MCP tools (including getPageList), explicitly included in the tools array type, and mapped through updateEngineTools in packages/plugins/robot/src/mcp/useMcp.ts (lines 65–73). Common type definitions (ToolItem, UpdateToolConfig) support title?, so TypeScript will pass and the UI will surface it correctly.

packages/plugins/page/src/mcp/tools/addPage.ts (1)

18-18: LGTM: Added title metadata.

Consistent with the PR’s pattern; no runtime impact.

packages/plugins/materials/src/mcp/tools/getComponentDetail.ts (1)

10-12: LGTM: Title field added.

Matches the cross-repo change; no behavior change.

packages/plugins/page/src/mcp/tools/editSpecificPage.ts (1)

10-10: LGTM: Title field added.

Aligned with the PR’s objective; no logic change.

packages/plugins/i18n/src/composable/tools/updateI18n.ts (1)

26-26: Title metadata addition looks good

The new title field aligns with the PR objective of surfacing UI-friendly titles on MCP tools.

packages/layout/src/mcp/tools/getAllPlugins.ts (1)

8-8: Title metadata addition looks good

Matches the PR-wide pattern of exposing user-friendly names for tools.

packages/layout/src/mcp/tools/switchPlugin.ts (1)

11-11: Title metadata addition looks good

Consistent with the rest of the MCP tools.

packages/plugins/page/src/mcp/tools/getPageDetail.ts (1)

40-40: Error message robustness improved

Using instanceof Error avoids emitting undefined messages when the thrown value is not an Error instance. Good defensive tweak.

packages/plugins/materials/src/mcp/tools/getComponentList.ts (1)

8-8: LGTM — title metadata addition is consistent with PR intent

The added title aligns with how engine tools now surface display names.

packages/canvas/DesignCanvas/src/mcp/tools/getPageSchema.ts (1)

8-16: LGTM: Title addition is consistent with annotations and engine propagation

The mapping in packages/plugins/robot/src/mcp/useMcp.ts confirms title: tool.title (line 70), so the top‐level title propagates correctly.

packages/canvas/DesignCanvas/src/mcp/tools/getCurrentSelectedNode.ts (1)

8-16: LGTM: Title added and consistent with annotations

No behavioral change; metadata is clear and aligned.

packages/canvas/DesignCanvas/src/mcp/tools/selectSpecificNode.ts (1)

10-20: LGTM: Title added; consistent with annotations and other tools

Matches the pattern across the PR; no concerns.

packages/canvas/DesignCanvas/src/mcp/tools/delNode.ts (2)

10-10: Title metadata added — aligns with PR goal

Adding the top-level title meets the PR objective and will help downstream UIs label this tool clearly.


13-14: Verify expected type for inputSchema across MCP tools

Our search shows every MCP tool (including delNode.ts) is passing the plain shape map via:

  • packages/canvas/DesignCanvas/src/mcp/tools/delNode.ts:13: inputSchema: inputSchema.shape

Please confirm that the MCP tooling runtime expects a Zod .shape object rather than the full Zod schema. If it actually requires the full schema, update:

- inputSchema: inputSchema.shape,
+ inputSchema: inputSchema,

accordingly.

@hexqi hexqi merged commit 27195a0 into opentiny:release/v2.8.x Aug 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore release merge to release/ branch, before release period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants