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.

195 lines (194 loc) 5.03 kB
export interface PromptArgument { name: string; description: string; required?: boolean; } export interface PromptMetadata { name: string; description: string; content: string; args?: PromptArgument[]; } export interface ToolMetadata { name: string; description: string; schema: Record<string, string>; hints: { hasResults: readonly string[]; empty: readonly string[]; }; } export interface CompleteMetadata { instructions: string; prompts: Record<string, PromptMetadata>; toolNames: { GITHUB_FETCH_CONTENT: 'githubGetFileContent'; GITHUB_SEARCH_CODE: 'githubSearchCode'; GITHUB_SEARCH_PULL_REQUESTS: 'githubSearchPullRequests'; GITHUB_SEARCH_REPOSITORIES: 'githubSearchRepositories'; GITHUB_VIEW_REPO_STRUCTURE: 'githubViewRepoStructure'; }; baseSchema: { mainResearchGoal: string; researchGoal: string; reasoning: string; bulkQuery: (toolName: string) => string; }; tools: Record<string, ToolMetadata>; baseHints: { hasResults: readonly string[]; empty: readonly string[]; }; genericErrorHints: readonly string[]; } type ToolNamesValue = CompleteMetadata['toolNames'][keyof CompleteMetadata['toolNames']]; export type ToolName = ToolNamesValue; export declare function initializeToolMetadata(): Promise<void>; export declare function loadToolContent(): Promise<CompleteMetadata>; export declare const TOOL_NAMES: CompleteMetadata["toolNames"]; export declare const BASE_SCHEMA: CompleteMetadata["baseSchema"]; export declare const GENERIC_ERROR_HINTS: readonly string[]; export declare function isToolAvailableSync(toolName: string): boolean; export declare function getToolHintsSync(toolName: string, resultType: 'hasResults' | 'empty'): readonly string[]; export declare function getGenericErrorHintsSync(): readonly string[]; export declare function getDynamicHints(toolName: string, hintType: 'topicsHasResults' | 'topicsEmpty' | 'keywordsEmpty'): readonly string[]; export declare const DESCRIPTIONS: Record<string, string>; export declare const TOOL_HINTS: Record<string, { hasResults: readonly string[]; empty: readonly string[]; }> & { base: { hasResults: readonly string[]; empty: readonly string[]; }; }; export declare const GITHUB_FETCH_CONTENT: { scope: { owner: string; repo: string; branch: string; path: string; }; processing: { minified: string; sanitize: string; }; range: { startLine: string; endLine: string; fullContent: string; matchString: string; matchStringContextLines: string; }; validation: { parameterConflict: string; }; }; export declare const GITHUB_SEARCH_CODE: { search: { keywordsToSearch: string; }; scope: { owner: string; repo: string; }; filters: { extension: string; stars: string; filename: string; path: string; match: string; }; resultLimit: { limit: string; }; processing: { minify: string; sanitize: string; }; }; export declare const GITHUB_SEARCH_REPOS: { search: { keywordsToSearch: string; topicsToSearch: string; }; scope: { owner: string; repo: string; }; filters: { stars: string; size: string; created: string; updated: string; match: string; }; sorting: { sort: string; }; resultLimit: { limit: string; }; }; export declare const GITHUB_SEARCH_PULL_REQUESTS: { search: { query: string; }; scope: { prNumber: string; owner: string; repo: string; }; filters: { match: string; created: string; updated: string; state: string; assignee: string; author: string; commenter: string; involves: string; mentions: string; "review-requested": string; "reviewed-by": string; label: string; "no-label": string; "no-milestone": string; "no-project": string; "no-assignee": string; head: string; base: string; closed: string; "merged-at": string; comments: string; reactions: string; interactions: string; merged: string; draft: string; }; sorting: { sort: string; order: string; }; resultLimit: { limit: string; }; outputShaping: { withComments: string; withCommits: string; type: string; partialContentMetadata: string; }; }; export declare const GITHUB_VIEW_REPO_STRUCTURE: { scope: { owner: string; repo: string; branch: string; path: string; }; range: { depth: string; }; }; export {};