Skip to content

[feat] Simplify Icemark Tool Creation Process (LLM-Driven Tools) #42

@kakuka

Description

@kakuka

Creating a new tool like save_resource currently involves touching many backend, UI, and i18n layers. While this ensures completeness, the developer cost is high.

We propose introducing a tool generation system or declarative tool registration framework to simplify the process of defining new tools for LLM use.


🎯 Goal

Make it possible to define and register a new LLM-usable tool with minimal boilerplate by consolidating schema, metadata, and system wiring into a single place.


🧱 Current Process (e.g. save_resource) Touches:

  • ✅ Type definitions in schemas/index.ts, ExtensionMessage.ts
  • ✅ Tool parameter & name registration in shared/tools.ts
  • ✅ Grouping via TOOL_GROUPS / TOOL_DISPLAY_NAMES
  • ✅ Tool metadata via getSaveResourceDescription
  • ✅ Tool implementation logic in core/tools
  • ✅ Execution logic in core/Cline.ts + tool switch
  • ✅ UI handling in ChatRow.tsx
  • ✅ i18n: en, zh-CN, zh-TW
  • ✅ Mode and permission integration

🚨 Currently, adding a new tool requires editing 10+ files manually.


💡 Proposal

Introduce a tool registry format that declaratively describes all metadata and behavior needed for system integration.

Example (tools/save-resource.meta.ts):

export const SaveResourceToolMeta = {
  name: "save_resource",
  group: "edit",
  displayName: {
    i18nkey
  },
  params: ["uri", "folder", "filename"],
  mode: ["workspace", "competitor-analysis"],
  permissions: ["write"],
  ui: {
    preview: true,
    confirmBeforeExecute: true,
    icon: "save",
    chatStyle: "fileResult"
  },
  handlerPath: "./saveResourceTool.ts",
  i18nKeys: ["wantsToSave", "didSave", "wantsToSaveOutsideWorkspace"]
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions