Files
Shutong Wu bc9499b203 fix(docs-gen): smarter sentence split for frontmatter descriptions
PR #1157 review (Copilot + CodeRabbit) flagged that several tool pages
had truncated frontmatter, e.g. manage_asset rendering as:
  description: "Performs asset operations (import, create, modify, delete, etc"

Root cause: the generator used `description.split(".")[0]` to derive the
frontmatter blurb. That cuts at the FIRST period — including periods
inside abbreviations and parenthesized lists ("etc.) in Unity."), so
the rendered description stopped mid-clause.

Fix: introduce `_first_sentence()` that splits on real sentence
boundaries — `.` / `!` / `?` followed by whitespace + capital, or a
paragraph break — and falls back to the whole string if no boundary
exists. Also caps absurdly long single-sentence descriptions at ~240
chars to keep frontmatter compact.

All three call sites that used the old split:
- frontmatter `description:` in render_tool_page
- group-index bullets in render_group_index
- catalog-index bullets in render_catalog_index

Regenerated all 43 tool pages + 9 group landings + catalog index +
resources catalog. Verified `--check` passes round-trip and full
website build is clean.

manage_asset now reads: "Performs asset operations (import, create,
modify, delete, etc.) in Unity."
2026-05-25 02:56:06 +08:00

3.7 KiB

title, sidebar_label, description
title sidebar_label description
core tools core MCP for Unity tools in the core group.

core tools

Essential scene, script, asset & editor tools (always on by default)

  • apply_text_edits — Apply small text edits to a C# script identified by URI.
  • batch_execute — Executes multiple MCP commands in a single batch for dramatically better performance.
  • create_script — Create a new C# script at the given project path.
  • debug_request_context — Return the current FastMCP request context details (client_id, session_id, and meta dump).
  • delete_script — Delete a C# script by URI or Assets-relative path.
  • execute_custom_tool — Execute a project-scoped custom tool registered by Unity.
  • execute_menu_item — Execute a Unity menu item by path.
  • find_gameobjects — Search for GameObjects in the scene by name, tag, layer, component type, or path.
  • find_in_file — Searches a file with a regex pattern and returns line numbers and excerpts.
  • get_sha — Get SHA256 and basic metadata for a Unity C# script without returning file contents.
  • manage_asset — Performs asset operations (import, create, modify, delete, etc.) in Unity.
  • manage_build — Manage Unity player builds — trigger builds, switch platforms, configure settings, manage build scenes and profiles, run batch builds across platforms.
  • manage_camera — Manage cameras (Unity Camera + Cinemachine).
  • manage_components — Add, remove, or set properties on components attached to GameObjects.
  • manage_editor — Controls and queries the Unity editor's state and settings.
  • manage_gameobject — Performs CRUD operations on GameObjects.
  • manage_graphics — Manage rendering graphics: volumes, post-processing, light baking, rendering stats, pipeline settings, and URP renderer features.
  • manage_material — Manages Unity materials (set properties, colors, shaders, etc).
  • manage_packages — Manage Unity packages: query, install, remove, embed, and configure registries.
  • manage_physics — Manage physics settings, collision matrix, materials, joints, queries, and validation.
  • manage_prefabs — Manages Unity Prefab assets.
  • manage_scene — Performs CRUD operations on Unity scenes.
  • manage_script — Compatibility router for legacy script operations.
  • manage_script_capabilities — Get manage_script capabilities (supported ops, limits, and guards).
  • manage_tools — Manage which tool groups are visible in this session.
  • read_console — Gets messages from or clears the Unity Editor console.
  • refresh_unity — Request a Unity asset database refresh and optionally a script compilation.
  • script_apply_edits — Structured C# edits (methods/classes) with safer boundaries - prefer this over raw text.
  • set_active_instance — Set the active Unity instance for this client/session.
  • validate_script — Validate a C# script and return diagnostics.