Skip to main content
Glama

Send Password Reset

affine_send_password_reset

Initiate password reset requests by sending a reset email with a callback URL to users of AFFiNE workspaces, ensuring secure account recovery.

Instructions

Send password reset email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callbackUrlNoCallback URL for password reset

Implementation Reference

  • The handler function that implements the logic for sending a password reset email using a GraphQL mutation.
    // SEND PASSWORD RESET EMAIL
    const sendPasswordResetHandler = async ({ callbackUrl }: { callbackUrl?: string }) => {
      try {
        const mutation = `
          mutation SendChangePasswordEmail($callbackUrl: String!) {
            sendChangePasswordEmail(callbackUrl: $callbackUrl)
          }
        `;
        
        const data = await gql.request<{ sendChangePasswordEmail: boolean }>(mutation, {
          callbackUrl: callbackUrl || `${process.env.AFFINE_BASE_URL}/reset-password`
        });
        
        return text({ success: data.sendChangePasswordEmail, message: "Password reset email sent" });
      } catch (error: any) {
        return text({ error: error.message });
      }
    };
  • Registration of the 'affine_send_password_reset' tool with the MCP server, including input schema definition.
    server.registerTool(
      "affine_send_password_reset",
      {
        title: "Send Password Reset",
        description: "Send password reset email.",
        inputSchema: {
          callbackUrl: z.string().optional().describe("Callback URL for password reset")
        }
      },
      sendPasswordResetHandler as any
    );
  • Zod input schema for the tool's 'callbackUrl' parameter.
      callbackUrl: z.string().optional().describe("Callback URL for password reset")
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without disclosing behavioral traits. It doesn't mention whether this requires authentication, what happens on success/failure, rate limits, or if it's idempotent. For a mutation tool with zero annotation coverage, this is inadequate.

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 extremely concise with just four words, front-loading the core action. Every word earns its place with zero waste, making it efficient for quick comprehension.

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 the tool returns, error conditions, or side effects. Given the complexity of password reset operations, more context is needed for safe agent invocation.

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 parameter 'callbackUrl'. The description adds no additional parameter information beyond what the schema provides, 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 action ('send password reset email') and resource ('password reset'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'affine_send_verify_email' or 'affine_change_password', which prevents a perfect score.

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 on when to use this tool versus alternatives like 'affine_change_password' or 'affine_sign_in'. The description lacks context about prerequisites (e.g., user must exist) or typical scenarios (e.g., forgot password flow).

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