Skip to main content
Glama

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") }

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