wgc
Version:
The official CLI tool to manage the GraphQL Federation Platform Cosmo
53 lines (52 loc) • 1.72 kB
TypeScript
import { z } from 'zod';
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { BaseCommandOptions } from '../../../core/types/types.js';
/**
* Zod schema for the introspect subgraph tool input.
* @property routingUrl - The routing URL of the subgraph.
* @property header - Optional headers for introspection.
* @property useRawIntrospection - Optional flag to use raw introspection query.
*/
export declare const introspectSubgraphInputSchema: z.ZodObject<{
routingUrl: z.ZodString;
header: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
key: string;
value: string;
}, {
key: string;
value: string;
}>, "many">>;
useRawIntrospection: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
routingUrl: string;
header?: {
key: string;
value: string;
}[] | undefined;
useRawIntrospection?: boolean | undefined;
}, {
routingUrl: string;
header?: {
key: string;
value: string;
}[] | undefined;
useRawIntrospection?: boolean | undefined;
}>;
/**
* Type inferred from the introspect subgraph input schema.
*/
export type IntrospectSubgraphInput = z.infer<typeof introspectSubgraphInputSchema>;
/**
* Registers the introspect subgraph tool with the MCP server.
*
* @param config - Configuration object containing the MCP server and base command options.
* @param config.server - The MCP server instance.
* @param config.opts - Base command options.
*/
export declare const registerIntrospectSubgraphTool: ({ server, opts }: {
server: McpServer;
opts: BaseCommandOptions;
}) => void;