set_api_version
Set the Glide API version and authentication key to enable secure, type-safe interactions and manage app data or perform CRUD operations via the Glide API MCP Server.
Instructions
Set the Glide API version and authentication to use
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | Yes | API key for authentication | |
| version | Yes | API version to use |
Implementation Reference
- src/index.ts:248-281 (handler)Handler for the set_api_version tool. Parses arguments, validates version and apiKey, instantiates the corresponding GlideApiClient, and sets it as the active client.if (request.params.name === 'set_api_version' && request.params.arguments) { // Allow overriding environment variables with explicit settings const args = request.params.arguments as { version: 'v1' | 'v2'; apiKey: string; }; // Validate API key is not empty if (!args.apiKey.trim()) { throw new McpError( ErrorCode.InvalidParams, 'API key cannot be empty' ); } const ClientClass = this.apiVersions[args.version]; if (!ClientClass) { throw new McpError( ErrorCode.InvalidParams, `Invalid API version: ${args.version}` ); } this.apiClient = new ClientClass(args.apiKey); return { content: [ { type: 'text', text: `Glide API version set to ${args.version}`, }, ], }; }
- src/index.ts:122-136 (schema)Input schema for set_api_version tool, defining required 'version' (enum: 'v1'|'v2') and 'apiKey' properties.inputSchema: { type: 'object', properties: { version: { type: 'string', enum: ['v1', 'v2'], description: 'API version to use', }, apiKey: { type: 'string', description: 'API key for authentication', }, }, required: ['version', 'apiKey'], },
- src/index.ts:119-137 (registration)Tool registration in the ListTools handler, providing name, description, and input schema for set_api_version.{ name: 'set_api_version', description: 'Set the Glide API version and authentication to use', inputSchema: { type: 'object', properties: { version: { type: 'string', enum: ['v1', 'v2'], description: 'API version to use', }, apiKey: { type: 'string', description: 'API key for authentication', }, }, required: ['version', 'apiKey'], }, },