/**
 * Studiograph MCP tool definitions
 *
 * Each tool is a thin wrapper around existing WorkspaceManager / BaseGraphManager
 * methods — no new business logic. Results are returned as JSON text so the
 * MCP client (Claude Desktop) can process structured data.
 *
 * Every tool enforces per-user access control via `services/access-control.ts`.
 * Callers (the HTTP /mcp route, the stdio MCP server) must resolve a user
 * identity before registering tools — `registerTools` requires a user in its
 * `McpAccessContext` argument so there is no anonymous MCP path.
 *
 * Note: `inputSchema` is cast to `any` at each call site because the MCP SDK's
 * ZodRawShapeCompat type does not accept ZodObject in TypeScript's strict mode.
 * Runtime schema validation is handled correctly by the SDK regardless.
 */
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { WorkspaceManager } from '../core/workspace-manager.js';
import type { AuthService, AuthUser } from '../services/auth-service.js';
import type { WsHub } from '../server/ws-hub.js';
import type { CommentService } from '../services/comment-service.js';
/**
 * Server identity passed to `new McpServer(...)` on BOTH transports (stdio
 * `src/mcp/server.ts` + HTTP `src/server/routes/mcp.ts`). Centralized so the
 * two surfaces can never drift on name/version.
 */
export declare const MCP_SERVER_INFO: {
    readonly name: "studiograph";
    readonly version: "1.0.0";
};
/**
 * Server-level `instructions` (MCP `ServerOptions.instructions`, surfaced in
 * the `initialize` response). With Claude Code's tool-search/deferral on, this
 * is what tells the client WHEN to search for Studiograph's tools — it loads
 * even when individual tool schemas are deferred. Must be passed in McpServer's
 * SECOND constructor arg (`new McpServer(MCP_SERVER_INFO, { instructions })`) —
 * putting it in the serverInfo object silently drops it.
 *
 * Budget: Claude Code truncates server instructions at 2KB and front-loads
 * matter most — keep this short and lead with category + when-to-reach-for-it.
 */
export declare const MCP_INSTRUCTIONS: string;
/**
 * Tools pinned against Claude Code's tool-search deferral via
 * `_meta["anthropic/alwaysLoad"]=true` (see PIN_META). These are the handful an
 * agent needs on essentially every turn, so they stay loaded even when the rest
 * of the surface is deferred (verified: code.claude.com/docs/en/mcp.md, CC
 * v2.1.121+). Keep this set SMALL — each pinned tool consumes upfront context.
 * Exported so tests can assert the pin lands on exactly these tools.
 */
export declare const MCP_PINNED_TOOLS: readonly ["search_entities", "list_entities", "get_entity", "create_entity"];
/** The resolved caller identity for an MCP session. */
export interface McpAccessContext {
    user: AuthUser;
    /**
     * Optional WebSocket hub. When supplied, entity-mutation tools
     * (create_entity, update_entity) broadcast `entity_change` events so
     * connected web clients refresh their views live — matching the HTTP
     * routes in graph-api.ts. Absent in contexts that have no hub (stdio
     * server, tests that don't care about live updates).
     */
    wsHub?: WsHub;
    /**
     * The user-set name on the api_tokens row that authenticated this session
     * (e.g. "Cursor", "Claude Desktop"). Surfaced in `entity_change` and
     * `agent_activity` events so other workspace users can see "Christian's
     * Cursor created entry X" rather than a bare username.
     */
    apiTokenName?: string;
    /**
     * Optional CommentService. When supplied, generic entity tools dispatch
     * `entity_type='comment'` reads through the virtual-entity adapter so
     * agents see comments as first-class typed entities. Absent on stdio
     * MCP contexts that don't construct a CommentService.
     */
    commentService?: CommentService;
}
export declare function registerTools(server: McpServer, wm: WorkspaceManager, authService: AuthService, ctx: McpAccessContext): void;
