Skip to main content
Glama

update-routine

Modify a specific routine by updating its name, description, or steps, while preserving the existing schema. Verify changes with the user before applying updates.

Instructions

Update a routine by name. Factor in the existing schema and update only the portion specified by the user. Always confirm with user that they want to update it. User may supply a name that's not exactly as how it's stored. Use the load-routines tool to get the list of all routines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesDescription of the routine.
nameYesExact name of the routine to be updated.
stepsYesSteps of the routine.

Implementation Reference

  • The handler function for the "update-routine" MCP tool. It calls the updateRoutine helper to persist the updated routine to the JSON file and returns a success message instructing the user to refresh their MCP tools.
    async ({ name, description, steps }) => { await updateRoutine({ filename: routineFilename, routine: { name, description, steps }, }) return { content: [ { type: "text", text: `Successfully updated routine ${name}. Always tell user to refresh their MCP tools.` } ] } }
  • Zod input schema for the "update-routine" tool, validating the name, description, and array of steps for the routine.
    { name: z.string().describe("Exact name of the routine to be updated."), description: z.string().describe("Description of the routine."), steps: z.array( z.object({ description: z.string().describe("Description of the step to help the LLM understand the purpose of the tool call"), tool: z.string().describe("The tool used with name, input schema used"), params: z.object({}).passthrough().describe("Parameters used to call the tool, based on the context some of these should be swapped out with dynamic values"), }) ).describe("Steps of the routine."), },
  • src/index.ts:75-104 (registration)
    Registration of the "update-routine" tool on the MCP server, specifying name, description, input schema, and handler function.
    server.tool( "update-routine", "Update a routine by name. Factor in the existing schema and update only the portion specified by the user. Always confirm with user that they want to update it. User may supply a name that's not exactly as how it's stored. Use the load-routines tool to get the list of all routines.", { name: z.string().describe("Exact name of the routine to be updated."), description: z.string().describe("Description of the routine."), steps: z.array( z.object({ description: z.string().describe("Description of the step to help the LLM understand the purpose of the tool call"), tool: z.string().describe("The tool used with name, input schema used"), params: z.object({}).passthrough().describe("Parameters used to call the tool, based on the context some of these should be swapped out with dynamic values"), }) ).describe("Steps of the routine."), }, async ({ name, description, steps }) => { await updateRoutine({ filename: routineFilename, routine: { name, description, steps }, }) return { content: [ { type: "text", text: `Successfully updated routine ${name}. Always tell user to refresh their MCP tools.` } ] } } )

Other Tools

Related 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/mquan/routine'

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