Skip to content

Commit 8618f83

Browse files
committed
docs: refresh v10 site homepage
1 parent 9df8615 commit 8618f83

5 files changed

Lines changed: 105 additions & 57 deletions

File tree

website/docs/guides/tool-groups.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ id: tool-groups
33
slug: /guides/tool-groups
44
title: Tool Groups and manage_tools
55
sidebar_label: Tool Groups
6-
description: Per-session visibility for the 43 tools. Activate vfx, animation, ui, testing, etc. only when you need them.
6+
description: Per-session visibility for the 47 tools. Activate vfx, animation, ui, testing, etc. only when you need them.
77
---
88

99
# Tool Groups
1010

11-
MCP for Unity ships 43 tools, but exposing all of them to the LLM at once balloons the prompt and dilutes routing decisions. So tools are sorted into **groups**, and only `core` is enabled by default.
11+
MCP for Unity ships 47 tools, but exposing all of them to the LLM at once balloons the prompt and dilutes routing decisions. So tools are sorted into **groups**, and only `core` is enabled by default.
1212

1313
## The groups
1414

@@ -64,7 +64,7 @@ Useful when a group's tools are confusing the assistant — e.g., `manage_shader
6464
Three reasons:
6565

6666
1. **Prompt economy**: each visible tool adds tokens to every assistant call. Hiding what you're not using is real money saved at scale.
67-
2. **Routing clarity**: when the LLM picks between 43 tools versus 30, the wrong-tool rate drops measurably.
67+
2. **Routing clarity**: when the LLM picks between 47 tools versus the 30 core tools, the wrong-tool rate drops measurably.
6868
3. **Package hygiene**: tools in `probuilder` only work if `com.unity.probuilder` is installed; hiding them by default avoids confusing errors.
6969

7070
## Server vs. session state

website/docusaurus.config.js

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// or "unity-mcp" into sidebar slugs, file paths, or docs URLs.
55

66
import { themes as prismThemes } from 'prism-react-renderer';
7-
import { readdirSync, existsSync } from 'node:fs';
7+
import { readdirSync, existsSync, readFileSync, statSync } from 'node:fs';
88
import { dirname, resolve } from 'node:path';
99
import { fileURLToPath } from 'node:url';
1010

@@ -20,6 +20,40 @@ function countConfigurators() {
2020
}
2121
const supportedClientCount = countConfigurators();
2222

23+
function listMarkdownFiles(dir) {
24+
if (!existsSync(dir)) return [];
25+
return readdirSync(dir).flatMap((entry) => {
26+
const path = resolve(dir, entry);
27+
if (statSync(path).isDirectory()) return listMarkdownFiles(path);
28+
return entry.endsWith('.md') ? [path] : [];
29+
});
30+
}
31+
32+
function countReferenceTools() {
33+
const dir = resolve(__dirname, 'docs', 'reference', 'tools');
34+
return listMarkdownFiles(dir).filter((path) => !path.endsWith('/index.md')).length;
35+
}
36+
37+
function countToolGroups() {
38+
const dir = resolve(__dirname, 'docs', 'reference', 'tools');
39+
if (!existsSync(dir)) return 0;
40+
return readdirSync(dir).filter((entry) => {
41+
const path = resolve(dir, entry);
42+
return statSync(path).isDirectory();
43+
}).length;
44+
}
45+
46+
function countReferenceResources() {
47+
const path = resolve(__dirname, 'docs', 'reference', 'resources', 'index.md');
48+
if (!existsSync(path)) return 0;
49+
return (readFileSync(path, 'utf8').match(/\n## `/g) ?? []).length;
50+
}
51+
52+
const latestVersion = 'v10.0.0';
53+
const toolCount = countReferenceTools();
54+
const toolGroupCount = countToolGroups();
55+
const resourceCount = countReferenceResources();
56+
2357
const baseUrl = '/unity-mcp/';
2458

2559
/** @type {import('@docusaurus/types').Config} */
@@ -41,6 +75,10 @@ const config = {
4175
// Build-time data the homepage components read via siteConfig.customFields.
4276
// Keeps stats accurate without a hand-maintained constant.
4377
customFields: {
78+
latestVersion,
79+
toolCount,
80+
toolGroupCount,
81+
resourceCount,
4482
supportedClientCount,
4583
},
4684

website/src/components/HomeFeatures/index.js

Lines changed: 58 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,67 @@
11
import React from 'react';
22
import Link from '@docusaurus/Link';
3+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
34
import styles from './styles.module.css';
45

5-
const features = [
6-
{
7-
n: '01',
8-
kicker: 'CONTROL',
9-
title: 'Talk to the Editor.',
10-
body: 'Drive scenes, GameObjects, scripts, assets, prefabs, and materials with natural language. 43 tools across 9 groups expose Unity’s editing surface to your MCP client.',
11-
href: '/reference/tools',
12-
cta: 'Browse tools',
13-
},
14-
{
15-
n: '02',
16-
kicker: 'ROUTING',
17-
title: 'Multiple Editors, one session.',
18-
body: 'Open several Unity Editors at once and aim a single MCP session at any of them. Per-call routing for cross-project prompts; session isolation across MCP clients.',
19-
href: '/guides/multi-instance',
20-
cta: 'How routing works',
21-
},
22-
{
23-
n: '03',
24-
kicker: 'TRANSPORT',
25-
title: 'HTTP or stdio. Your call.',
26-
body: 'HTTP for multi-agent, remote-hosted, and shared workflows. Stdio for single-client setups like Claude Desktop. Auto-detected and auto-configured.',
27-
href: '/architecture/transports',
28-
cta: 'HTTP vs stdio',
29-
},
30-
{
31-
n: '04',
32-
kicker: 'VISIBILITY',
33-
title: 'Your tools, on demand.',
34-
body: 'Per-session visibility. Activate animation, vfx, ui, testing, or probuilder tools only when needed. Smaller prompt, sharper routing, lower cost.',
35-
href: '/guides/tool-groups',
36-
cta: 'Tool groups',
37-
},
38-
{
39-
n: '05',
40-
kicker: 'DOCS',
41-
title: 'Generated, never stale.',
42-
body: 'Every tool and resource page is generated from the Python @mcp_for_unity_tool registry. CI fails if the docs drift. Examples you write are preserved across regenerations.',
43-
href: '/contributing/docs',
44-
cta: 'Docs workflow',
45-
},
46-
{
47-
n: '06',
48-
kicker: 'EXTEND',
49-
title: 'Plug in custom tools.',
50-
body: 'Write a C# attribute, register a new domain. The MCP client picks it up automatically. Project-scoped or global. Full reflection-based dispatch.',
51-
href: '/guides/custom-tools',
52-
cta: 'Custom tools',
53-
},
54-
];
6+
function getFeatures(toolCount, toolGroupCount) {
7+
return [
8+
{
9+
n: '01',
10+
kicker: 'CONTROL',
11+
title: 'Talk to the Editor.',
12+
body: `Drive scenes, GameObjects, scripts, assets, prefabs, and materials with natural language. ${toolCount} tools across ${toolGroupCount} groups expose Unity's editing surface to your MCP client.`,
13+
href: '/reference/tools',
14+
cta: 'Browse tools',
15+
},
16+
{
17+
n: '02',
18+
kicker: 'ROUTING',
19+
title: 'Multiple Editors, one session.',
20+
body: 'Open several Unity Editors at once and aim a single MCP session at any of them. Per-call routing for cross-project prompts; session isolation across MCP clients.',
21+
href: '/guides/multi-instance',
22+
cta: 'How routing works',
23+
},
24+
{
25+
n: '03',
26+
kicker: 'TRANSPORT',
27+
title: 'HTTP or stdio. Your call.',
28+
body: 'HTTP for multi-agent, remote-hosted, and shared workflows. Stdio for single-client setups like Claude Desktop. Auto-detected and auto-configured.',
29+
href: '/architecture/transports',
30+
cta: 'HTTP vs stdio',
31+
},
32+
{
33+
n: '04',
34+
kicker: 'VISIBILITY',
35+
title: 'Your tools, on demand.',
36+
body: 'Per-session visibility. Activate animation, vfx, ui, testing, or probuilder tools only when needed. Smaller prompt, sharper routing, lower cost.',
37+
href: '/guides/tool-groups',
38+
cta: 'Tool groups',
39+
},
40+
{
41+
n: '05',
42+
kicker: 'DOCS',
43+
title: 'Generated, never stale.',
44+
body: 'Every tool and resource page is generated from the Python @mcp_for_unity_tool registry. CI fails if the docs drift. Examples you write are preserved across regenerations.',
45+
href: '/contributing/docs',
46+
cta: 'Docs workflow',
47+
},
48+
{
49+
n: '06',
50+
kicker: 'EXTEND',
51+
title: 'Plug in custom tools.',
52+
body: 'Write a C# attribute, register a new domain. The MCP client picks it up automatically. Project-scoped or global. Full reflection-based dispatch.',
53+
href: '/guides/custom-tools',
54+
cta: 'Custom tools',
55+
},
56+
];
57+
}
5558

5659
export default function HomeFeatures() {
60+
const { siteConfig } = useDocusaurusContext();
61+
const toolCount = siteConfig.customFields?.toolCount ?? 47;
62+
const toolGroupCount = siteConfig.customFields?.toolGroupCount ?? 10;
63+
const features = getFeatures(toolCount, toolGroupCount);
64+
5765
return (
5866
<section className={styles.section}>
5967
<div className={styles.inner}>

website/src/components/HomeHero/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const UPM_BETA = 'https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#b
99

1010
export default function HomeHero() {
1111
const { siteConfig } = useDocusaurusContext();
12-
const version = siteConfig.customFields?.latestVersion ?? 'v9.7.0';
12+
const version = siteConfig.customFields?.latestVersion ?? 'v10.0.0';
1313

1414
return (
1515
<header className={styles.hero}>

website/src/components/HomeStats/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import styles from './styles.module.css';
44

55
export default function HomeStats() {
66
const { siteConfig } = useDocusaurusContext();
7+
const toolCount = siteConfig.customFields?.toolCount ?? 47;
8+
const resourceCount = siteConfig.customFields?.resourceCount ?? 25;
79
const clientCount = siteConfig.customFields?.supportedClientCount ?? 0;
810

911
const stats = [
10-
{ value: '43', unit: 'tools', label: 'MCP tool surface' },
11-
{ value: '25', unit: 'resources', label: 'read-only state' },
12+
{ value: String(toolCount), unit: 'tools', label: 'MCP tool surface' },
13+
{ value: String(resourceCount), unit: 'resources', label: 'read-only state' },
1214
{ value: String(clientCount), unit: 'clients', label: 'auto-configured' },
1315
{ value: '2021.3 → 6.x', unit: 'lts', label: 'Unity version range' },
1416
];

0 commit comments

Comments
 (0)