Skip to main content
Glama
mrwyndham

PocketBase MCP Server

impersonate_user

Allows administrators to temporarily assume another user's identity for testing or support purposes by generating an impersonation token.

Instructions

Impersonate another user (admin only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the user to impersonate
collectionIdOrNameNoCollection name or id (default: users)users
durationNoToken expirey time (default: 3600)

Implementation Reference

  • src/index.ts:522-545 (registration)
    Registration of the 'impersonate_user' tool in the MCP tools list, including its description and input schema. No separate handler implementation found; it will likely throw MethodNotFound when called.
    {
      name: 'impersonate_user',
      description: 'Impersonate another user (admin only)',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'ID of the user to impersonate',
          },
          collectionIdOrName: {
            type: 'string',
            description: 'Collection name or id (default: users)',
            default: 'users'
          },
          duration: {
            type: 'number',
            description: 'Token expirey time (default: 3600)',
            default: 3600
          }
        },
        required: ['id'],
      },
    },
  • Input schema definition for the 'impersonate_user' tool, specifying parameters for user ID, collection, and duration.
    inputSchema: {
      type: 'object',
      properties: {
        id: {
          type: 'string',
          description: 'ID of the user to impersonate',
        },
        collectionIdOrName: {
          type: 'string',
          description: 'Collection name or id (default: users)',
          default: 'users'
        },
        duration: {
          type: 'number',
          description: 'Token expirey time (default: 3600)',
          default: 3600
        }
      },
      required: ['id'],
    },
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 offers limited behavioral insight. It mentions admin-only access but doesn't disclose critical traits like whether this is a read/write operation, security implications, token generation details, or side effects. For a sensitive tool like impersonation, this is a significant gap in transparency.

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 a single, front-loaded sentence that states the core purpose and key constraint ('admin only'). There is zero waste or redundancy, making it efficient and easy to parse, though this conciseness comes at the cost of depth in other dimensions.

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?

Given the tool's complexity (impersonation is a high-stakes operation), lack of annotations, and no output schema, the description is incomplete. It fails to explain what the tool returns (e.g., a token or session), security considerations, or how it integrates with sibling authentication tools, leaving critical context gaps for safe and effective use.

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 parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond implying user impersonation, which aligns with the 'id' parameter. Baseline 3 is appropriate as the schema handles the heavy lifting, but the description doesn't enhance understanding of parameter usage or constraints.

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 ('impersonate') and target ('another user'), with the additional constraint 'admin only' indicating permission requirements. However, it doesn't explicitly differentiate this tool from sibling authentication tools like 'authenticate_user' or 'create_user', which would require more specific context about what impersonation entails versus standard authentication.

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 minimal guidance with 'admin only' hinting at when to use (admin contexts), but lacks explicit when-not-to-use scenarios, alternatives (e.g., vs. 'authenticate_user'), or prerequisites. No comparison to sibling tools is made, leaving usage context vague beyond the admin restriction.

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

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/mrwyndham/pocketbase-mcp'

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