Skip to main content
Glama
foodpanda-mcp
by johnwhoyou

Refresh Session Token

refresh_token

Opens a visible browser login to capture and save a new foodpanda session token when the current one expires, is missing, or you need to switch accounts.

Instructions

Opens a browser window to foodpanda.ph so the user can log in. Intercepts the session token from network requests and updates the server. Call this when: (1) other tools return a 'session token expired' or 'No session token configured' error, or (2) the user wants to switch accounts. The browser window is visible — the user logs in manually (handling any CAPTCHAs or MFA). Once logged in, the token is captured automatically and saved for future sessions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "refresh_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNoHow long to wait for login in seconds (default 120). Increase if the user needs more time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it: it discloses that a visible browser window opens, that the user logs in manually and handles CAPTCHAs/MFA, and that the token is captured automatically and persisted for future sessions. The main gap is the failure path — what happens if the user never logs in or the capture fails before the timeout expires.

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?

Front-loaded with the mechanism, then the trigger conditions, then the interactive caveat. Every sentence supplies information an agent needs — no restated title, no filler.

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

Completeness4/5

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

The authentication flow, the human-in-the-loop requirement, and the persistence of the captured token are all covered, which is what matters for a no-output-schema tool. The only real omission is timeout/failure behavior, which matters because the tool blocks on a human.

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 coverage is 100% and the single timeout parameter is already fully described in the schema, including its 120-second default and the reason to increase it. The description adds no parameter meaning beyond that, so the baseline 3 is appropriate.

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?

States a specific mechanism (opens a browser window to foodpanda.ph, intercepts the session token from network requests, updates the server) rather than a vague 'refresh'. This is unmistakably distinct from the sibling cart/order/menu tools, which never touch authentication.

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?

Gives two explicit numbered triggers — a 'session token expired' or 'No session token configured' error from other tools, or the user wanting to switch accounts — plus when the interactive path applies. Nothing is left to inference about when to call this instead of retrying the failing tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.