UNPKG

octocode-mcp

Version:

Model Context Protocol (MCP) server for advanced GitHub repository analysis and code discovery. Provides AI assistants with powerful tools to search, analyze, and understand codebases across GitHub.

24 lines (23 loc) 1.06 kB
import type { GitHubAPIError } from '../github/githubAPI'; import type { ToolErrorResult, ToolSuccessResult } from '../types.js'; import { TOOL_NAMES } from './toolMetadata.js'; export declare function createErrorResult(query: { mainResearchGoal?: string; researchGoal?: string; reasoning?: string; }, error: string | GitHubAPIError, apiError?: GitHubAPIError): ToolErrorResult; export declare function createSuccessResult<T>(query: { mainResearchGoal?: string; researchGoal?: string; reasoning?: string; }, data: T, hasContent: boolean, _toolName: keyof typeof TOOL_NAMES, customHints?: string[]): ToolSuccessResult<T extends Record<string, unknown> ? T : never> & T; export declare function handleApiError(apiResult: unknown, query: { mainResearchGoal?: string; researchGoal?: string; reasoning?: string; }): ToolErrorResult | null; export declare function handleCatchError(error: unknown, query: { mainResearchGoal?: string; researchGoal?: string; reasoning?: string; }, contextMessage?: string): ToolErrorResult;