Skip to content

Commit d4bebf6

Browse files
Remove structuredContent references from tool descriptions
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
1 parent 09c82f2 commit d4bebf6

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

docs/mcp-server-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Include:
6868
1. **What the tool does** (1-2 sentences)
6969
2. **Behavior & gotchas** - semantics that aren't obvious from types alone
7070
(cross-field rules, default meaning, side effects)
71-
3. **Outputs & return semantics** - what `structuredContent` means and how to
71+
3. **Outputs & return semantics** - what the structured result means and how to
7272
use it (the _shape_ lives in `outputSchema`)
7373
4. **Errors & recovery** - common failure modes and what to do next
7474
5. **Examples** - concrete, copy/pasteable payloads

mcp/server-metadata.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export const serverMetadata = {
88
instructions: `
99
Quick start
1010
- Use 'do_math' to compute a single arithmetic operation on two numbers.
11-
- Tools return both human-readable markdown in 'content' and machine-friendly data in 'structuredContent'.
11+
- Tools return both a human-readable message and a machine-readable result.
1212
1313
Default behavior
14-
- 'do_math.precision' controls ONLY the human-readable formatting. 'structuredContent.result' is not rounded.
14+
- 'do_math.precision' controls ONLY display formatting; it does not change the computed value.
1515
- Division by zero is rejected with an actionable error message.
1616
1717
How to chain tools safely
@@ -38,16 +38,12 @@ export const toolsMetadata = {
3838
Compute a single arithmetic operation over two numbers.
3939
4040
Behavior:
41-
- Division by zero is rejected and includes a stable error code in 'structuredContent.error'.
42-
- 'precision' affects ONLY the markdown output in 'content'; 'structuredContent.result' is not rounded.
41+
- Division by zero is rejected.
42+
- 'precision' affects ONLY display formatting; it does not change the computed numeric result.
4343
4444
Examples:
4545
- "Add 8 and 4" → { left: 8, operator: "+", right: 4 }
4646
- "Divide 1 by 3 with 3 decimals" → { left: 1, operator: "/", right: 3, precision: 3 }
47-
48-
Next:
49-
- Use 'structuredContent.result' if you need a machine-friendly number.
50-
- If you need to present the result to a user, use the markdown text in 'content'.
5147
`.trim(),
5248
annotations: readOnlyToolAnnotations,
5349
},

mcp/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function registerTools(agent: MCP) {
4646
.optional()
4747
.default(6)
4848
.describe(
49-
'Decimal places used ONLY for the markdown output (0-15, default: 6). Does not round structuredContent.result.',
49+
'Decimal places used ONLY for the markdown output (0-15, default: 6). Does not change the computed numeric result.',
5050
),
5151
},
5252
outputSchema: {

0 commit comments

Comments
 (0)