diff --git a/src/entrypoints/sdk/toolTypes.ts b/src/entrypoints/sdk/toolTypes.ts old mode 100755 new mode 100644 index 336ce12..0010af9 --- a/src/entrypoints/sdk/toolTypes.ts +++ b/src/entrypoints/sdk/toolTypes.ts @@ -1 +1,22 @@ -export {} +import type { CallToolResult, ToolAnnotations } from '@modelcontextprotocol/sdk/types.js' + +import type { AnyZodRawShape, InferShape, SdkMcpToolDefinition } from './runtimeTypes.ts' + +export type { AnyZodRawShape, InferShape, SdkMcpToolDefinition } + +export type SdkMcpToolHandler = ( + args: InferShape, + extra: unknown, +) => Promise + +export type SdkMcpToolExtras = { + annotations?: ToolAnnotations + searchHint?: string + alwaysLoad?: boolean +} + +export type SdkMcpToolDescriptor = Pick< + SdkMcpToolDefinition, + 'name' | 'description' | 'inputSchema' | 'handler' +> & + SdkMcpToolExtras