Skip to main content
Glama

update_category

Idempotent

Update category details by providing its ID and optionally modifying name, slug, description, publication status, or parent assignment.

Instructions

Update a category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the categorie to update
nameNoTitle of the category.
slugNoFriendly identifier of a category.
descriptionNoThe description of the category.
is_publishedNoBoolean if the category is published on the website.
parent_idNoUnique identifier of the parent category

Implementation Reference

  • The tool 'update_category' is registered via server.registerTool() with its metadata (description, annotations, inputSchema) and handler.
    server.registerTool(
      "update_category",
      {
        description: "Update a category.",
        annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
        inputSchema: {
          id: z.number().int().positive().describe("ID of the categorie to update"),
          name: z.string().optional().describe("Title of the category."),
          slug: z.string().optional().describe("Friendly identifier of a category."),
          description: z.string().optional().describe("The description of the category."),
          is_published: z.boolean().optional().describe("Boolean if the category is published on the website."),
          parent_id: z.number().int().optional().describe("Unique identifier of the parent category"),
        },
      },
      async ({ id, ...body }) => {
        try {
          const record = await apiPatch<EduframeRecord>(`/categories/${id}`, body);
          void logResponse("update_category", { id, ...body }, record);
          return formatUpdate(record, "categorie");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • The async handler function for 'update_category': destructures id from body, calls apiPatch to PATCH /categories/{id}, logs the response, and formats the result.
    async ({ id, ...body }) => {
      try {
        const record = await apiPatch<EduframeRecord>(`/categories/${id}`, body);
        void logResponse("update_category", { id, ...body }, record);
        return formatUpdate(record, "categorie");
      } catch (error) {
        return formatError(error);
      }
    },
  • Input schema for 'update_category' using Zod: id (required number), name, slug, description, is_published, parent_id (all optional).
    inputSchema: {
      id: z.number().int().positive().describe("ID of the categorie to update"),
      name: z.string().optional().describe("Title of the category."),
      slug: z.string().optional().describe("Friendly identifier of a category."),
      description: z.string().optional().describe("The description of the category."),
      is_published: z.boolean().optional().describe("Boolean if the category is published on the website."),
      parent_id: z.number().int().optional().describe("Unique identifier of the parent category"),
    },
  • src/tools/index.ts:8-8 (registration)
    Import of registerCategorieTools (which registers update_category) in the central tools index.
    import { registerCategorieTools } from "./categories";
  • registerCategorieTools added to the tools array, called by registerAllTools() to register all category tools including update_category.
    registerCategorieTools,
Behavior3/5

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

The description is consistent with annotations (non-readOnly, non-destructive, idempotent). It does not add behavioral context beyond what annotations already provide, such as what happens if the ID is invalid or what the response contains.

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

Conciseness4/5

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

The description is very concise, consisting of a single clear sentence. While it is minimal, it is not verbose, and the brevity is acceptable for a simple tool.

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

Completeness2/5

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

The description lacks important context for an update tool, such as whether it returns the updated category, error handling for nonexistent IDs, or how partial updates work. Given six parameters and no output schema, more completeness is needed.

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?

Since the input schema has 100% description coverage, the description does not need to elaborate on parameters. It adds no additional meaning, but the baseline of 3 is appropriate given high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Update') and the resource ('a category'). It is distinct from sibling tools like 'create_category' and 'get_category' due to the verb, but it does not specify which fields can be updated, leaving some ambiguity.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives, such as when to update vs. create or retrieve a category. There are no prerequisites or context on when updates are appropriate.

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/martijnpieters/eduframe-mcp'

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