chore: introduce capabilities argument (#135)

This commit is contained in:
Pavel Feldman 2025-04-04 17:14:30 -07:00 committed by GitHub
parent 707ebbf4d4
commit abd56f514b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 432 additions and 242 deletions

View file

@ -18,6 +18,8 @@ import type { ImageContent, TextContent } from '@modelcontextprotocol/sdk/types'
import type { JsonSchema7Type } from 'zod-to-json-schema';
import type { Context } from '../context';
export type ToolCapability = 'core' | 'tabs' | 'pdf' | 'history' | 'wait' | 'files' | 'install';
export type ToolSchema = {
name: string;
description: string;
@ -30,6 +32,7 @@ export type ToolResult = {
};
export type Tool = {
capability: ToolCapability;
schema: ToolSchema;
handle: (context: Context, params?: Record<string, any>) => Promise<ToolResult>;
};