update_integration_models
Enable, disable, or register custom models for an integration to control model availability across workspaces.
Instructions
Enable, disable, or register custom models for an integration. This changes model availability for every workspace using it, so confirm the downstream impact first. Returns success and the number of models updated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The slug of the integration | |
| models | Yes | Array of model configurations to update |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |
Implementation Reference
- Service method that executes the API call to update models for an integration. Sends a PUT request to /integrations/{slug}/models with the request body.
// Update models for an integration async updateIntegrationModels( slug: string, data: UpdateIntegrationModelsRequest, ): Promise<{ success: boolean }> { await this.put( `/integrations/${this.encodePathSegment(slug)}/models`, data, ); return { success: true }; } - src/tools/integrations.tools.ts:503-533 (handler)MCP tool handler for 'update_integration_models'. Calls the service's updateIntegrationModels and returns a success response with the number of models updated.
// Update integration models tool server.tool( "update_integration_models", "Enable, disable, or register custom models for an integration. This changes model availability for every workspace using it, so confirm the downstream impact first. Returns success and the number of models updated.", INTEGRATIONS_TOOL_SCHEMAS.updateIntegrationModels, async (params) => { const result = await service.integrations.updateIntegrationModels( params.slug, { models: params.models, }, ); return { content: [ { type: "text", text: JSON.stringify( { message: `Successfully updated models for integration "${params.slug}"`, success: result.success, models_updated: params.models.length, }, null, 2, ), }, ], }; }, ); - Zod schema for the tool input: requires slug (string) and models (array of {slug, model_name?, enabled, is_custom?}).
updateIntegrationModels: { slug: z.string().describe("The slug of the integration"), models: z .array( z.object({ slug: z.string().describe("The model slug identifier"), model_name: z .string() .optional() .describe( "Display name for the model (required for custom models)", ), enabled: z.boolean().describe("Whether the model is enabled"), is_custom: z .boolean() .optional() .describe("Whether this is a custom model (default: false)"), }), ) .describe("Array of model configurations to update"), }, - TypeScript interface for the request body: models array with slug, optional model_name, enabled, and optional is_custom.
export interface UpdateIntegrationModelsRequest { models: Array<{ slug: string; model_name?: string; enabled: boolean; is_custom?: boolean; }>; } - src/tools/integrations.tools.ts:504-533 (registration)Registration of the tool with the MCP server under the name 'update_integration_models'.
server.tool( "update_integration_models", "Enable, disable, or register custom models for an integration. This changes model availability for every workspace using it, so confirm the downstream impact first. Returns success and the number of models updated.", INTEGRATIONS_TOOL_SCHEMAS.updateIntegrationModels, async (params) => { const result = await service.integrations.updateIntegrationModels( params.slug, { models: params.models, }, ); return { content: [ { type: "text", text: JSON.stringify( { message: `Successfully updated models for integration "${params.slug}"`, success: result.success, models_updated: params.models.length, }, null, 2, ), }, ], }; }, );