Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
slugYesThe slug of the integration
modelsYesArray of model configurations to update

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured 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 };
    }
  • 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;
    	}>;
    }
  • 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,
    					),
    				},
    			],
    		};
    	},
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds context beyond annotations by noting the model availability change affects all workspaces and the return value. However, annotations already show this is not read-only, and the description does not fully elaborate side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action, followed by a crucial warning and return information. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's two parameters and output schema, the description covers the effect, warning, and return. Could be improved by explaining how this relates to delete_integration_model, but it's sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are well-documented. The description adds minimal extra meaning beyond the schema, only clarifying 'register custom models' and the return value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool enables, disables, or registers custom models for an integration, which is a specific verb-resource combination. It distinguishes from siblings like create_integration or delete_integration_model.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description warns about downstream impact on all workspaces, advising caution. This provides context for when to use the tool, though it doesn't explicitly list alternative tools for single model removal.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/s-b-e-n-s-o-n/portkey-admin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server