Skip to main content
Glama

delete_comment

DestructiveIdempotent

Delete a comment using its unique ID to remove unwanted or outdated comments from the system.

Instructions

Delete a comment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the comment to delete

Implementation Reference

  • The handler function for the delete_comment tool. It accepts an `id` parameter, calls `apiDelete` on `/comments/{id}`, logs the response, and formats the result.
    async ({ id }) => {
      try {
        const record = await apiDelete<EduframeRecord>(`/comments/${id}`);
        void logResponse("delete_comment", { id }, record);
        return formatDelete(record, "comment");
      } catch (error) {
        return formatError(error);
      }
    },
  • Input schema for delete_comment: requires `id` (positive integer) describing the ID of the comment to delete.
    inputSchema: { id: z.number().int().positive().describe("ID of the comment to delete") },
  • Registration of delete_comment tool via server.registerTool with description 'Delete a comment.', destructiveHint true, and the input schema + handler.
    server.registerTool(
      "delete_comment",
      {
        description: "Delete a comment.",
        annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the comment to delete") },
      },
      async ({ id }) => {
        try {
          const record = await apiDelete<EduframeRecord>(`/comments/${id}`);
          void logResponse("delete_comment", { id }, record);
          return formatDelete(record, "comment");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • The apiDelete helper function used by delete_comment to send a DELETE HTTP request to the Eduframe API.
    export async function apiDelete<T>(path: string): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "DELETE",
        headers: buildHeaders(token),
      });
    
      return handleResponse<T>(response);
    }
  • The formatDelete helper function used to format the response for a successful deletion.
    export function formatDelete(record: EduframeRecord, resourceName: string): CallToolResult {
      return {
        content: [
          {
            type: "text",
            text: `Successfully deleted ${resourceName}:\n\n${formatJSON(record)}${RESPONSE_LOG_HINT}`,
          },
        ],
      };
    }
Behavior2/5

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

With destructiveHint=true and idempotentHint=true already in annotations, the description adds no behavioral context such as permanence, permissions, or 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.

Conciseness2/5

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

While concise, the description is too minimal (3 words) and does not earn its place by providing useful information beyond the tool name.

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?

For a simple destructive tool, the description lacks completeness—e.g., no mention of permanence, return value, or any prerequisites for deletion.

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% and the schema already describes the id parameter sufficiently. The description adds no additional meaning beyond what the schema provides.

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

Purpose2/5

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

The description 'Delete a comment.' merely restates the tool name without adding any additional meaning or distinguishing it from the many other delete_* tools in the sibling list.

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 like update_comment or create_comment, nor any conditions for safe use.

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