Skip to main content
Glama

Update Profile

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")
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Update' implies mutation, it doesn't specify required permissions, whether changes are reversible, rate limits, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after updating (e.g., confirmation message, error handling), nor does it address behavioral aspects like authentication requirements or side effects.

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 description coverage is 100%, so the schema already documents both parameters (avatarUrl, name) with clear descriptions. The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline for 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 verb ('Update') and resource ('current user's profile information'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'affine_current_user' (which likely reads profile) or 'affine_update_settings' (which might update different settings).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), when not to use it, or how it differs from similar tools like 'affine_update_settings' or 'affine_current_user'.

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

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

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