import type { Octokit } from '@octokit/rest'; /** * Standardized response format for tool execution * Compatible with MCP SDK's CallToolResult */ export interface ToolResult { [key: string]: unknown; content: Array<{ type: 'text'; text: string; }>; isError?: boolean; } /** * Function signature for tool handlers */ export type ToolHandler = (octokit: Octokit, args: Record) => Promise; /** * JSON Schema for tool input validation */ export interface ToolInputSchema { type: 'object'; properties: Record; required?: string[]; } /** * MCP tool definition (what gets sent to the client) */ export interface MCPToolDefinition { name: string; description: string; inputSchema: ToolInputSchema; } /** * Tool definition bundled with its handler */ export interface GitHubToolDefinition { definition: MCPToolDefinition; handler: ToolHandler; } /** * A category of related tools */ export interface ToolCategory { name: string; description: string; tools: GitHubToolDefinition[]; } /** * Helper to create a successful tool result */ export declare function successResult(data: unknown): ToolResult; /** * Helper to create an error tool result */ export declare function errorResult(message: string): ToolResult;