Skip to main content
Glama
zhaolibins001-svg

Smart Browser MCP

api_login

Authenticate API requests by calling a login endpoint, extracting the token from the JSON response, and storing it in default headers for subsequent calls.

Instructions

Call a login endpoint, extract a token from the JSON response via tokenPath (dot path, e.g. "data.token"), and store it into defaultHeaders for all subsequent api_request/api_assert calls. Fails loudly if the token path is not found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesLogin endpoint, absolute or relative to baseUrl
bodyNoLogin credentials, e.g. {username, password}
methodNo
tokenPathNoDefault "token"
headerNameNoDefault "Authorization"
headerPrefixNoDefault "Bearer "

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the side effect (writing to defaultHeaders), the extraction mechanism (dot path), and the failure mode ('Fails loudly if the token path is not found'). It could also state the default HTTP method or payload serialization, but the most important behaviors are covered.

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?

Two sentences with no filler. The core action is stated first, followed by the storage side effect and the error behavior. Every sentence contributes useful information.

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?

For a tool with no output schema and no annotations, the description covers the main flow, side effects, and a key error condition. Minor gaps remain, such as the default method for the request or how the body is serialized, but these do not prevent correct selection and invocation.

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?

Schema description coverage is 83%, so the schema already documents most parameters. The description adds value by explaining how tokenPath, headerName, and headerPrefix work together to populate defaultHeaders, and gives a concrete dot-path example. It does not clarify the method parameter, but the core semantics are enhanced 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 states a specific sequence of actions: call a login endpoint, extract a token via tokenPath, and store it into defaultHeaders. This clearly distinguishes it from the sibling api_request/api_assert tools by naming its integration effect, so an agent can tell what it does without opening the schema.

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 gives clear usage context by stating the token is stored 'for all subsequent api_request/api_assert calls', which implies when the tool should be used. It does not explicitly name alternatives or exclusions, but the purpose is concrete enough to guide selection.

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