import { z } from "zod"; import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import type { AliasMap, AppConfig } from "../config.js"; import type { GitLabClient } from "../gitlab/client.js"; import type { JsonMap } from "../gitlab/types.js"; import { type SafetyLevel } from "../security/guards.js"; import { type ToolCategory } from "./profiles.js"; export interface ToolDeps { readonly server: McpServer; readonly client: GitLabClient; readonly config: AppConfig; } export interface ToolExecutionContext { readonly client: GitLabClient; readonly config: AppConfig; readonly resolveProjectId: (projectId: string) => string; readonly resolveGroupId: (groupId: string) => string; readonly requireProject: (projectId: string) => Promise; readonly requireGroup: (groupId: string) => Promise; } interface ToolDefinition { readonly name: string; readonly title: string; readonly description: string; readonly safety: SafetyLevel; readonly category?: ToolCategory; readonly profiles?: readonly AppConfig["toolProfile"][]; readonly inputSchema: TSchema; readonly handler: (args: z.output>, context: ToolExecutionContext) => Promise; } export declare function registerTool(deps: ToolDeps, definition: ToolDefinition): void; export declare function resolveConfiguredAlias(value: string, aliases: AliasMap, aliasType: "project" | "group"): string; export declare function resolveToolArgumentAliases(args: Record, config: AppConfig): Record; export declare function getProject(client: GitLabClient, projectId: string): Promise; export declare function getGroup(client: GitLabClient, groupId: string): Promise; export declare function accessLevelOf(project: JsonMap): number; export declare function assertMaintainerAccess(project: JsonMap): void; export declare function assertCommentAccess(project: JsonMap): void; export declare function assertInternalNoteAccess(project: JsonMap): void; export declare function assertDeveloperAccess(project: JsonMap): void; export declare function paginateResult(items: readonly T[], pagination: unknown): JsonMap; export declare function cleanQuery(query: Record): Record; export {};