Skip to main content
Glama
mgwalkerjr95

Texas Grocery MCP

by mgwalkerjr95

session_refresh

Refresh HEB session cookies and tokens to maintain access. Automates login, handles CAPTCHA, 2FA, and security challenges, returning success or requesting human intervention when needed.

Instructions

Refresh HEB session cookies and tokens.

Uses embedded browser when available (fast: ~10-15 seconds). If credentials are saved and login is required, attempts automatic login. Falls back to returning Playwright MCP commands if browser dependencies aren't installed.

Args: headless: Run browser without visible window (default True). Set to False if you need to complete a manual login (e.g., when your session has fully expired). timeout: Maximum time to wait for page load in milliseconds. Default 30000 (30 seconds). login_timeout: Maximum time to wait for manual login in milliseconds. Default 300000 (5 minutes). Only used when headless=False. use_saved_credentials: If True and credentials are stored, attempt automatic login when session is expired. Default True.

Returns: dict with one of these statuses: - {"status": "success", ...} - Login/refresh completed successfully - {"status": "human_action_required", "action": "login" | "captcha" | "2fa" | "waf", ...} Human intervention required (login form, CAPTCHA, 2FA, or a WAF/security interstitial). The browser remains open; complete the action, then call session_refresh() again. - {"status": "failed", ...} - Login/refresh failed with error details

Use this tool when:

  • session_status shows needs_refresh: true

  • session_status shows refresh_recommended: true

  • product_search returns security_challenge_detected: true

  • You want to proactively refresh before token expires

CAPTCHA/2FA handling:

  • When CAPTCHA or 2FA is detected, returns immediately with screenshot_path

  • The screenshot shows exactly what the user sees in the browser

  • Use the Read tool to view the screenshot and describe it to the user

  • The browser stays open - user solves CAPTCHA/enters code in that window

  • After solving, call session_refresh() again to continue the login flow

  • Repeat until status is "success" or "failed"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo
headlessNo
login_timeoutNo
use_saved_credentialsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully discloses behavior: uses embedded browser, fallback to Playwright commands, headless mode, timeout handling, auto-login, return statuses (success, human_action_required, failed), and CAPTCHA/2FA handling with screenshot. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is detailed but well-structured: introduction, args, returns, use cases, CAPTCHA/2FA handling. Every sentence adds value and it is front-loaded with the core purpose. Slightly lengthy but not wasteful.

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?

Given 4 parameters, no annotations, and the existence of an output schema (described in Returns), the description covers parameter semantics, return values, usage scenarios, and edge cases (manual login, CAPTCHA). It is comprehensive and leaves no gaps.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates by explaining each parameter: headless (default True, set False for manual login), timeout (default 30000), login_timeout (default 300000, only when headless=False), use_saved_credentials (default True, auto-login). Adds meaning beyond the 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 refreshes HEB session cookies and tokens. The verb 'refresh' and resource 'session cookies and tokens' are specific, and it distinguishes from sibling tools like session_status and session_clear by focusing on the refresh action.

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

Usage Guidelines4/5

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

The description explicitly lists conditions for use (e.g., session_status shows needs_refresh, refresh_recommended, product_search returns security_challenge_detected) and provides guidance on handling CAPTCHA/2FA. It does not explicitly state when not to use, but the context is clear.

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/mgwalkerjr95/texas-grocery-mcp'

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