Skip to main content
Glama

Verify a Pi user access token

verify_user
Read-only

Authenticate a Pi user by checking their access token against the Pi Platform API. Returns the token's owner, or a reason for invalid tokens, so you never trust a client-supplied uid alone.

Instructions

Check whether a Pi user access token is genuine and, if so, who it belongs to. Call this to authenticate someone who claims a Pi identity — never trust a client-supplied uid or username on its own; this is the only thing that proves it. Returns valid: false with a reason for a rejected token rather than failing. Sends the token to the Pi Platform API (https://api.minepi.com/v2/me) and nothing else; it is not stored or logged. Note the uid is app-specific — the same person has a different uid under a different Pi app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_tokenYesThe user's Pi access token, obtained from Pi Browser authentication or Pi Sign-in OAuth. This is a credential — pass the token itself, not a uid.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidNo
validYes
app_idNo
reasonNo
scopesNo
usernameNo
valid_untilNo
Behavior5/5

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

The description goes well beyond the readOnlyHint/openWorldHint annotations by disclosing that a rejected token returns `valid: false` with a reason rather than throwing an error, that the token is sent to a specific Pi Platform API endpoint and not stored or logged, and that the uid is app-specific. These are valuable behavioral details not visible in the annotations.

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 compact and front-loaded with the core purpose. Every sentence adds meaningful information: verification purpose, when to use, return behavior, side effects, and a caveat about uid scoping. No fluff or redundant content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter verification tool with an output schema and annotations, this description is complete. It covers purpose, usage, failure behavior, network interaction, privacy, and a subtle domain nuance (app-specific uid), leaving no critical gaps for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides 100% coverage for the `access_token` parameter with a clear description. The main description adds extra semantic context (token is a credential, client-supplied uid is not sufficient, uid is app-specific) that helps the agent understand the meaning and constraints of the parameter beyond the basic schema.

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

Purpose5/5

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

The description clearly states the tool's purpose: checking whether a Pi user access token is genuine and identifying the user it belongs to. It distinguishes this from sibling tools by framing it as the authentication/verification tool, explicitly saying 'this is the only thing that proves it.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided: 'Call this to authenticate someone who claims a Pi identity — never trust a client-supplied uid or username on its own.' This tells the agent when to use the tool and also warns against relying on alternatives (client-supplied uid/username).

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/jleeblack/pion-mcp'

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