@lexq/cli 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+
3
+ interface McpToolResult {
4
+ [key: string]: unknown;
5
+ content: Array<{
6
+ type: 'text';
7
+ text: string;
8
+ }>;
9
+ isError?: boolean;
10
+ }
11
+ /**
12
+ * Function signature for making API calls.
13
+ * Injected into tool registration functions for testability and reuse.
14
+ *
15
+ * - lexq-cli (stdio): uses createCallApiFromConfig() — reads ~/.lexq/config.json
16
+ * - lexq-mcp (HTTP): uses createApiCaller(apiKey) — Bearer token from request
17
+ */
18
+ type CallApi = (method: string, path: string, opts?: {
19
+ body?: unknown;
20
+ params?: Record<string, string>;
21
+ }) => Promise<McpToolResult>;
22
+ declare function paginationParams(page?: number, size?: number): Record<string, string>;
23
+
24
+ /**
25
+ * Registers all 53 MCP tools on the given server.
26
+ *
27
+ * @param server - McpServer instance
28
+ * @param callApi - API caller function (config-based for CLI, Bearer-based for HTTP)
29
+ */
30
+ declare function registerAllTools(server: McpServer, callApi: CallApi): void;
31
+
32
+ export { type CallApi, type McpToolResult, paginationParams, registerAllTools };