toolcraft 0.0.146 → 0.0.147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -334,6 +334,28 @@ defineCommand({
334
334
  });
335
335
  ```
336
336
 
337
+ MCP assumes an unannotated tool may mutate data destructively, is not safe to retry, and can
338
+ interact with an open world. Declare the standard hints on each MCP command so clients can present
339
+ the operation accurately:
340
+
341
+ ```ts
342
+ defineCommand({
343
+ name: "inspect",
344
+ title: "Inspect deployment",
345
+ description: "Inspect a deployment without changing it.",
346
+ annotations: {
347
+ readOnlyHint: true,
348
+ destructiveHint: false,
349
+ idempotentHint: true,
350
+ openWorldHint: false
351
+ },
352
+ scope: ["mcp"],
353
+ params: S.Object({ deploymentId: S.String() }),
354
+ result: S.Object({ status: S.String() }),
355
+ handler: async ({ params }) => inspectDeployment(params.deploymentId)
356
+ });
357
+ ```
358
+
337
359
  ## HTTP errors
338
360
 
339
361
  Toolcraft exports a fixed HTTP error hierarchy for transports and generated API clients:
@@ -554,7 +576,9 @@ Toolcraft configuration is code-first. Use `defineCommand(config)` and `defineGr
554
576
  ### `defineCommand(config)`
555
577
 
556
578
  - `name: string`
579
+ - `title?: string` — human-readable MCP display name.
557
580
  - `description?: string`
581
+ - `annotations?: { title?; readOnlyHint?; destructiveHint?; idempotentHint?; openWorldHint? }` — standard MCP behavior hints passed through unchanged.
558
582
  - `aliases?: string[]`
559
583
  - `positional?: string[]` — parameter names mapped from CLI argv order.
560
584
  - `params: S.Object(...)` — input schema from `toolcraft-schema`.
package/composition.json CHANGED
@@ -98,7 +98,7 @@
98
98
  },
99
99
  {
100
100
  "name": "tiny-http-mcp-server",
101
- "version": "0.1.6",
101
+ "version": "0.1.7",
102
102
  "license": "MIT"
103
103
  },
104
104
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.146",
116
+ "version": "0.0.147",
117
117
  "license": "MIT"
118
118
  },
119
119
  {
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "toolcraft-schema",
126
- "version": "0.0.146",
126
+ "version": "0.0.147",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -98,7 +98,7 @@
98
98
  },
99
99
  {
100
100
  "name": "tiny-http-mcp-server",
101
- "version": "0.1.6",
101
+ "version": "0.1.7",
102
102
  "license": "MIT"
103
103
  },
104
104
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.146",
116
+ "version": "0.0.147",
117
117
  "license": "MIT"
118
118
  },
119
119
  {
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "toolcraft-schema",
126
- "version": "0.0.146",
126
+ "version": "0.0.147",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
package/dist/index.d.ts CHANGED
@@ -95,7 +95,9 @@ export interface Renderers<TResult> {
95
95
  markdown?: (result: TResult, primitives: RenderPrimitives) => string;
96
96
  json?: (result: TResult, primitives: RenderPrimitives) => unknown;
97
97
  }
98
+ /** Standard MCP hints that describe a tool's behavior to clients. */
98
99
  export interface ToolAnnotations {
100
+ title?: string;
99
101
  readOnlyHint?: boolean;
100
102
  destructiveHint?: boolean;
101
103
  idempotentHint?: boolean;
package/dist/mcp-proxy.js CHANGED
@@ -78,7 +78,9 @@ function createProxyCommand(parent, tool, commandName, connection) {
78
78
  return markProxyNode({
79
79
  kind: "command",
80
80
  name: commandName,
81
+ title: tool.title,
81
82
  description: tool.description,
83
+ annotations: tool.annotations === undefined ? undefined : { ...tool.annotations },
82
84
  hidden: false,
83
85
  examples: [],
84
86
  aliases: [],
package/dist/mcp.js CHANGED
@@ -219,11 +219,11 @@ function enumerateTools(root, casing, allowlist, omitRootToolNamePrefix) {
219
219
  }
220
220
  commandPathsByToolName.set(name, resolvedCommandPath);
221
221
  tools.push({
222
+ ...(node.annotations === undefined ? {} : { annotations: { ...node.annotations } }),
222
223
  command: node,
223
224
  commandPath: resolvedCommandPath,
224
225
  name,
225
226
  ...(node.title === undefined ? {} : { title: node.title }),
226
- ...(node.annotations === undefined ? {} : { annotations: { ...node.annotations } }),
227
227
  description: buildToolDescription(node.description, params, node.examples, node.name, casing),
228
228
  inputSchema: applySchemaCasing(toJsonSchema(params), casing),
229
229
  ...(node.result === undefined
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  "name": "tiny-http-mcp-server",
21
- "version": "0.1.6",
21
+ "version": "0.1.7",
22
22
  "license": "MIT"
23
23
  },
24
24
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiny-http-mcp-server",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Minimal MCP server over HTTP built on tiny-stdio-mcp-server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -304,6 +304,7 @@ declare class McpClient {
304
304
  }
305
305
  interface Tool {
306
306
  name: string;
307
+ title?: string;
307
308
  description?: string;
308
309
  inputSchema: Record<string, unknown>;
309
310
  outputSchema?: Record<string, unknown>;
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "name": "toolcraft-schema",
11
- "version": "0.0.146",
11
+ "version": "0.0.147",
12
12
  "license": "MIT"
13
13
  }
14
14
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.146",
3
+ "version": "0.0.147",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft",
3
- "version": "0.0.146",
3
+ "version": "0.0.147",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -158,7 +158,7 @@
158
158
  "yaml"
159
159
  ],
160
160
  "optionalDependencies": {
161
- "toolcraft-schema": "0.0.146",
161
+ "toolcraft-schema": "0.0.147",
162
162
  "toolcraft-design": "*",
163
163
  "@poe-code/frontmatter": "*",
164
164
  "@poe-code/agent-mcp-config": "*",