modality-mcp-kit 0.0.2 → 0.2.0

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.
@@ -1,3 +1,4 @@
1
1
  export { toJsonSchema } from "xsschema";
2
2
  export { setupAITools, ModalityFastMCP } from "./util_mcp_tools_converter";
3
3
  export type { AITools, AITool, FastMCPTool, } from "./schemas/schemas_tool_config";
4
+ export type { FastMCPCompatible, Prompt } from "./util_mcp_tools_converter";
@@ -1,10 +1,27 @@
1
1
  import type { AITools, FastMCPTool, ToolParameters } from "./schemas/schemas_tool_config";
2
+ export interface Prompt {
3
+ name: string;
4
+ description?: string;
5
+ title?: string;
6
+ completionLimit?: number;
7
+ arguments?: Array<{
8
+ name: string;
9
+ description?: string;
10
+ required?: boolean;
11
+ title?: string;
12
+ enum?: readonly string[];
13
+ }>;
14
+ load: (params: Record<string, string>) => Promise<string>;
15
+ }
2
16
  /**
3
17
  * FastMCP-compatible interface for MCP server functionality
4
18
  * Provides exact API compatibility with FastMCP.addTool method
5
19
  */
6
20
  export interface FastMCPCompatible {
7
21
  addTool<Params extends ToolParameters>(tool: FastMCPTool<any, Params>): void;
22
+ getTools?(): FastMCPTool<any, any>[];
23
+ addPrompt(prompt: Prompt): void;
24
+ getPrompts(): Prompt[];
8
25
  }
9
26
  /**
10
27
  * ModalityFastMCP - A FastMCP-compatible implementation
@@ -12,6 +29,7 @@ export interface FastMCPCompatible {
12
29
  */
13
30
  export declare class ModalityFastMCP implements FastMCPCompatible {
14
31
  private tools;
32
+ private prompts;
15
33
  /**
16
34
  * Add a tool to the server
17
35
  */
@@ -20,6 +38,8 @@ export declare class ModalityFastMCP implements FastMCPCompatible {
20
38
  * Get all registered tools
21
39
  */
22
40
  getTools(): FastMCPTool<any, any>[];
41
+ addPrompt(prompt: Prompt): void;
42
+ getPrompts(): Prompt[];
23
43
  }
24
44
  /**
25
45
  * Setup function that optionally registers AITools with MCP server
@@ -4,6 +4,7 @@
4
4
  */
5
5
  export class ModalityFastMCP {
6
6
  tools = new Map();
7
+ prompts = [];
7
8
  /**
8
9
  * Add a tool to the server
9
10
  */
@@ -16,6 +17,12 @@ export class ModalityFastMCP {
16
17
  getTools() {
17
18
  return Array.from(this.tools.values());
18
19
  }
20
+ addPrompt(prompt) {
21
+ this.prompts.push(prompt);
22
+ }
23
+ getPrompts() {
24
+ return this.prompts;
25
+ }
19
26
  }
20
27
  /**
21
28
  * Setup function that optionally registers AITools with MCP server
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.2",
2
+ "version": "0.2.0",
3
3
  "name": "modality-mcp-kit",
4
4
  "repository": {
5
5
  "type": "git",
@@ -22,13 +22,14 @@
22
22
  "author": "Hill <hill@kimo.com>",
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
+ "modality-kit": "^0.14.5",
25
26
  "xsschema": "0.3.5",
26
27
  "zod": "^3.25.76",
27
- "zod-to-json-schema": "^3.24.6"
28
+ "zod-to-json-schema": "^3.25.0"
28
29
  },
29
30
  "devDependencies": {
30
- "@types/bun": "^1.2.22",
31
- "typescript": "^5.9.2"
31
+ "@types/bun": "^1.3.3",
32
+ "typescript": "^5.9.3"
32
33
  },
33
34
  "exports": {
34
35
  "types": "./dist/types/index.d.ts",