Skip to main content
Glama
mrwyndham

PocketBase MCP Server

authenticate_with_oauth2

Authenticate users with OAuth2 providers to enable secure access to PocketBase database operations. Handles authorization codes, PKCE verification, and redirect URLs for authentication flows.

Instructions

Authenticate a user with OAuth2

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesOAuth2 provider name (e.g., google, facebook, github)
codeYesThe authorization code returned from the OAuth2 provider
codeVerifierYesPKCE code verifier
redirectUrlYesThe redirect URL used in the OAuth2 flow
collectionNoCollection name (default: users)users

Implementation Reference

  • src/index.ts:332-362 (registration)
    Registration of the 'authenticate_with_oauth2' tool in the ListToolsRequestSchema response. Includes the tool name, description, and input schema. Note: No corresponding handler implementation found in the CallToolRequestSchema switch statement.
    {
      name: 'authenticate_with_oauth2',
      description: 'Authenticate a user with OAuth2',
      inputSchema: {
        type: 'object',
        properties: {
          provider: {
            type: 'string',
            description: 'OAuth2 provider name (e.g., google, facebook, github)',
          },
          code: {
            type: 'string',
            description: 'The authorization code returned from the OAuth2 provider',
          },
          codeVerifier: {
            type: 'string',
            description: 'PKCE code verifier',
          },
          redirectUrl: {
            type: 'string',
            description: 'The redirect URL used in the OAuth2 flow',
          },
          collection: {
            type: 'string',
            description: 'Collection name (default: users)',
            default: 'users'
          }
        },
        required: ['provider', 'code', 'codeVerifier', 'redirectUrl'],
      },
    },
  • Input schema for the 'authenticate_with_oauth2' tool, defining parameters for OAuth2 authentication including provider, code, codeVerifier, redirectUrl, and optional collection.
    inputSchema: {
      type: 'object',
      properties: {
        provider: {
          type: 'string',
          description: 'OAuth2 provider name (e.g., google, facebook, github)',
        },
        code: {
          type: 'string',
          description: 'The authorization code returned from the OAuth2 provider',
        },
        codeVerifier: {
          type: 'string',
          description: 'PKCE code verifier',
        },
        redirectUrl: {
          type: 'string',
          description: 'The redirect URL used in the OAuth2 flow',
        },
        collection: {
          type: 'string',
          description: 'Collection name (default: users)',
          default: 'users'
        }
      },
      required: ['provider', 'code', 'codeVerifier', 'redirectUrl'],
    },
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions authentication but doesn't explain what happens (e.g., token generation, session creation, user record updates), permissions required, error handling, or side effects. This leaves critical behavioral traits unspecified for a security-sensitive operation.

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 no wasted words. It's front-loaded with the core action, making it easy to parse quickly, though this brevity contributes to gaps 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 complexity of OAuth2 authentication, lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects, return values, or usage context, leaving significant gaps for a tool with 5 parameters and security implications.

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%, providing clear parameter details. The description adds no additional semantic context beyond implying OAuth2 usage, which is already covered by parameter names and schema descriptions. This meets the baseline for high schema coverage without enhancing understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Authenticate a user') and mechanism ('with OAuth2'), which is clear but vague. It doesn't specify what authentication entails (e.g., obtaining tokens, creating sessions) or differentiate from sibling tools like 'authenticate_user' or 'authenticate_with_otp', leaving ambiguity about when to use this specific OAuth2 method.

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 'authenticate_user' or 'authenticate_with_otp'. The description implies it's for OAuth2 flows but doesn't specify prerequisites (e.g., needing an authorization code from a provider) or exclusions, offering minimal context for decision-making.

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