Skip to main content
Glama

affine_update_comment

Modify comment content within AFFiNE workspaces using the GraphQL API. Input the comment ID and updated content to manage and refine collaborative discussions effectively.

Instructions

Update a comment content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNo
idYes

Implementation Reference

  • The async handler function that executes the GraphQL mutation to update a comment's content and returns success status.
    const updateCommentHandler = async (parsed: { id: string; content: any }) => { const mutation = `mutation UpdateComment($input: CommentUpdateInput!){ updateComment(input:$input) }`; const data = await gql.request<{ updateComment: boolean }>(mutation, { input: { id: parsed.id, content: parsed.content } }); return text({ success: data.updateComment }); };
  • Registration of the 'affine_update_comment' tool using server.registerTool, specifying title, description, Zod input schema, and linking to the shared updateCommentHandler.
    server.registerTool( "affine_update_comment", { title: "Update Comment", description: "Update a comment content.", inputSchema: { id: z.string(), content: z.any() } }, updateCommentHandler as any );
  • Input schema definition using Zod for the tool: requires 'id' (string) and 'content' (any).
    { title: "Update Comment", description: "Update a comment content.", inputSchema: { id: z.string(), content: z.any() } },

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