Skip to main content
Glama

affine_update_profile

Update user profile details such as display name and avatar URL on the AFFiNE MCP Server for improved workspace personalization and management.

Instructions

Update current user's profile information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
avatarUrlNoAvatar URL
nameNoDisplay name

Implementation Reference

  • The handler function `updateProfileHandler` that executes the GraphQL mutation to update the user's profile name and/or avatar URL.
    const updateProfileHandler = async ({ name, avatarUrl }: { name?: string; avatarUrl?: string }) => { try { const mutation = ` mutation UpdateProfile($input: UpdateUserInput!) { updateProfile(input: $input) { id name avatarUrl email } } `; const input: any = {}; if (name !== undefined) input.name = name; if (avatarUrl !== undefined) input.avatarUrl = avatarUrl; const data = await gql.request<{ updateProfile: any }>(mutation, { input }); return text(data.updateProfile); } catch (error: any) { return text({ error: error.message }); } };
  • Registers the 'affine_update_profile' tool with the MCP server, including title, description, input schema using Zod, and binds it to the updateProfileHandler function.
    server.registerTool( "affine_update_profile", { title: "Update Profile", description: "Update current user's profile information.", inputSchema: { name: z.string().optional().describe("Display name"), avatarUrl: z.string().optional().describe("Avatar URL") } }, updateProfileHandler as any );
  • Input schema definition using Zod for optional name and avatarUrl parameters.
    inputSchema: { name: z.string().optional().describe("Display name"), avatarUrl: z.string().optional().describe("Avatar URL") }

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