Skip to main content
Glama

Update Settings

affine_update_settings

Modify user preferences and settings within AFFiNE workspaces via a structured settings object to customize the user experience.

Instructions

Update user settings and preferences.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
settingsYesSettings object with key-value pairs

Implementation Reference

  • The async handler function that executes the tool logic: updates user settings by sending a GraphQL mutation to updateSettings with the provided settings object.
    const updateSettingsHandler = async ({ settings }: { settings: Record<string, any> }) => {
      try {
        const mutation = `
          mutation UpdateSettings($input: UpdateUserSettingsInput!) {
            updateSettings(input: $input) {
              success
            }
          }
        `;
        
        const data = await gql.request<{ updateSettings: any }>(mutation, { 
          input: settings 
        });
        
        return text(data.updateSettings);
      } catch (error: any) {
        return text({ error: error.message });
      }
    };
  • The server.registerTool call that registers the 'affine_update_settings' tool, including its title, description, inputSchema (using Zod), and references the handler.
    server.registerTool(
      "affine_update_settings",
      {
        title: "Update Settings",
        description: "Update user settings and preferences.",
        inputSchema: {
          settings: z.record(z.any()).describe("Settings object with key-value pairs")
        }
      },
      updateSettingsHandler as any
    );
    server.registerTool(
      "update_settings",
      {
        title: "Update Settings",
        description: "Update user settings and preferences.",
        inputSchema: {
          settings: z.record(z.any()).describe("Settings object with key-value pairs")
        }
      },
      updateSettingsHandler as any
  • The input schema definition using Zod for the tool's 'settings' parameter, defined inline in the registration.
    inputSchema: {
      settings: z.record(z.any()).describe("Settings object with key-value pairs")
    }
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 a mutation operation, it doesn't specify what permissions are required, whether changes are reversible, what happens to unspecified settings, or any rate limits/constraints. For a mutation tool with zero annotation coverage, this is a significant gap.

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 with zero wasted words. It's appropriately sized for a simple update operation and front-loads the essential information immediately.

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 settings can be updated, what the response looks like, or potential side effects. Given the complexity of user settings and the lack of structured documentation, more context is needed.

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 the single 'settings' parameter as an object with key-value pairs. The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline expectation when schema coverage is high.

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 'user settings and preferences', making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'affine_update_profile' or 'affine_update_comment', which could cause confusion about scope boundaries.

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 about when to use this tool versus alternatives like 'affine_update_profile' or 'affine_change_password'. The description offers no context about appropriate use cases, prerequisites, or exclusions, leaving the agent to guess based on tool names alone.

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