xmcp 1.3.0 → 1.4.1

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.
@@ -0,0 +1,10 @@
1
+ import type { Icon } from "@modelcontextprotocol/server";
2
+ /** Metadata shared by tools, prompts, and resources. */
3
+ export interface ComponentMetadata {
4
+ /** Icons that clients may display for this component. */
5
+ icons?: Icon[];
6
+ /** Labels exposed as _meta["xmcp/tags"]. */
7
+ tags?: string[];
8
+ /** Set false to skip registration. Defaults to true. */
9
+ enabled?: boolean;
10
+ }
@@ -1,7 +1,10 @@
1
+ import type { ComponentMetadata } from "./component";
1
2
  export type { GetPromptResult, PromptMessage, } from "@modelcontextprotocol/server";
2
- export type PromptMetadata = {
3
+ export type PromptMetadata = ComponentMetadata & {
3
4
  name: string;
4
5
  title: string;
5
6
  description: string;
6
7
  role?: string;
8
+ /** Metadata exposed in prompts/list. */
9
+ _meta?: Record<string, unknown>;
7
10
  };
@@ -1,8 +1,9 @@
1
+ import type { ComponentMetadata } from "./component";
1
2
  import { UIMetadata } from "./ui-meta";
2
3
  import type { CompleteResourceTemplateCallback } from "@modelcontextprotocol/server";
3
4
  /** Completion callbacks keyed by the resource's URI template parameters. */
4
5
  export type ResourceCompletions = Record<string, CompleteResourceTemplateCallback>;
5
- export interface ResourceMetadata {
6
+ export interface ResourceMetadata extends ComponentMetadata {
6
7
  name: string;
7
8
  title?: string;
8
9
  description?: string;
@@ -1,3 +1,4 @@
1
+ import type { ComponentMetadata } from "./component";
1
2
  import { z } from "zod/v3";
2
3
  import type { ZodType as ZodTypeV4, infer as inferV4 } from "zod";
3
4
  import type { CreateMessageRequestParamsBase, CreateMessageResult, ElicitResult as McpElicitResult } from "@modelcontextprotocol/server";
@@ -16,7 +17,7 @@ export interface ToolAnnotations {
16
17
  openWorldHint?: boolean;
17
18
  [key: string]: any;
18
19
  }
19
- export interface ToolMetadata {
20
+ export interface ToolMetadata extends ComponentMetadata {
20
21
  /** Unique identifier for the tool */
21
22
  name: string;
22
23
  /** Human-readable description */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xmcp",
3
3
  "description": "The MCP framework",
4
- "version": "1.3.0",
4
+ "version": "1.4.1",
5
5
  "author": {
6
6
  "name": "xmcp",
7
7
  "email": "support@xmcp.dev",
@@ -120,7 +120,7 @@
120
120
  "del": "^7.1.0",
121
121
  "dotenv": "^16.6.1",
122
122
  "express": "^4.22.1",
123
- "fastify": "^5.0.0",
123
+ "fastify": "^5.12.5",
124
124
  "fs-extra": "^11.3.2",
125
125
  "glob": "^11.1.0",
126
126
  "is-docker": "^4.0.0",