Skip to content

Conversation

@RomaRogov
Copy link
Contributor

@RomaRogov RomaRogov commented Feb 1, 2026

MCP tool tool_info renamed to tools_info and let LLM collect data about multiple tools in one call.
Tools are collected in plain text as tool result is stylized as TypeScript definition.
For the same reason, if one of the tools found but some doesn't - info about it is added at the end in the style of code comment.
Example output:

namespace CocosEditor {
  interface GetPropertiesInput {
    /** The Node/Component/Asset UUID or special targets: 'ProjectSettings', 'CurrentSceneSettings'. */
    targetId: string;
    /** Optional property path to filter results (e.g. 'position.x'). */
    path?: string;
  }

  interface GetPropertiesOutput {
    [key: string]: any;
  }
}

/**
 * Gets properties of instance as a plain object, without metadata.
 * Tags: editor, inspection, properties
 * Access as: CocosEditor.GetProperties(args)
 */



namespace CocosEditor {
  interface SetPropertyInput {
    /** The Node/Component/Asset UUID or special targets: 'ProjectSettings', 'CurrentSceneSettings'. */
    targetId: string;
    /** Plain path to the property (e.g., 'position.x', '__comps__.0.string'). Don't support code execution. */
    path: string;
    /** Value to set */
    value: any[] | object | string | number | boolean | null;
  }

  interface SetPropertyOutput {
    [key: string]: any;
  }
}

/**
 * Sets a property on instance or settings directly.
 * Tags: property, set
 * Access as: CocosEditor.SetProperty(args)
 */

// Tool 'NonExistingNamespace.NonExistingTool' not found
// Tool 'CocosEditor.NonExistingTool' not found
// Tool 'asdf' not found

Summary by cubic

Renamed MCP tool tool_info to tools_info and added batching to fetch info for multiple tools in one call. Outputs TypeScript definitions and appends “not found” tools as code comments.

  • New Features

    • Accepts tool_names array and returns combined TypeScript interfaces.
    • Adds // Tool 'name' not found comments for missing tools; returns error only if none are found.
  • Migration

    • Replace tool_info with tools_info.
    • Update input from tool_name: string to tool_names: string[].

Written for commit 8195085. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="code-mode-mcp/index.ts">

<violation number="1" location="code-mode-mcp/index.ts:221">
P2: Renaming `tool_info` to `tools_info` without an alias leaves existing callers and even the built-in usage prompt pointing to a non-existent tool, causing “tool not found” errors.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

mcp.registerTool("tool_info", {
title: "Get Tool Information with TypeScript Interface",
description: "Get complete information about a specific tool including TypeScript interface definition.",
mcp.registerTool("tools_info", {
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 1, 2026

Choose a reason for hiding this comment

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

P2: Renaming tool_info to tools_info without an alias leaves existing callers and even the built-in usage prompt pointing to a non-existent tool, causing “tool not found” errors.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At code-mode-mcp/index.ts, line 221:

<comment>Renaming `tool_info` to `tools_info` without an alias leaves existing callers and even the built-in usage prompt pointing to a non-existent tool, causing “tool not found” errors.</comment>

<file context>
@@ -218,21 +218,35 @@ Remember: The power of this system comes from combining multiple tools in sophis
-    mcp.registerTool("tool_info", {
-        title: "Get Tool Information with TypeScript Interface",
-        description: "Get complete information about a specific tool including TypeScript interface definition.",
+    mcp.registerTool("tools_info", {
+        title: "Get Tools Information with TypeScript Interface",
+        description: "Get complete information about a specified list of tools, including TypeScript interface definition.",
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant