Skip to main content
Glama

affine_delete_comment

Remove a specific comment from AFFiNE workspaces by providing its unique ID, ensuring clean and organized collaboration using the GraphQL API.

Instructions

Delete a comment by id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The asynchronous handler function that executes the tool logic: sends a GraphQL mutation to delete the comment by ID and returns success status.
    const deleteCommentHandler = async (parsed: { id: string }) => { const mutation = `mutation DeleteComment($id:String!){ deleteComment(id:$id) }`; const data = await gql.request<{ deleteComment: boolean }>(mutation, { id: parsed.id }); return text({ success: data.deleteComment }); };
  • Registers the 'affine_delete_comment' tool with the MCP server, providing title, description, input schema, and linking to the handler function.
    server.registerTool( "affine_delete_comment", { title: "Delete Comment", description: "Delete a comment by id.", inputSchema: { id: z.string() } }, deleteCommentHandler as any );
  • Zod schema for input validation: requires a string 'id' parameter.
    id: z.string() }

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/DAWNCR0W/affine-mcp-server'

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