Skip to main content
Glama

call_api

Invoke Python JS API methods on the exposed object to interact with pywebview app internals.

Instructions

Call a js_api method directly on the Python object exposed to the page. Example: call_api("get_state") when the app exposes state via js_api.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
kwargsNo
methodYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the action but does not mention potential side effects, safety considerations, or error behaviors. The example only illustrates invocation, not what happens when the method is called or whether it mutates state. This is a significant gap for a tool that invokes arbitrary methods.

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 two sentences: a clear definition and an illustrative example. It is concise, front-loaded, and contains no filler. Every word earns its place, making it efficient for an agent to parse.

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?

The tool is an arbitrary method call with multiple parameters, but the description is minimal and lacks details about how to structure arguments, what js_api entails, or error handling. While an output schema exists, it doesn't cover the invocation mechanics. The description is insufficient for an agent to confidently use the tool in varied scenarios.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. The example implies 'method' is the name of the js_api method, but it does not explain how to use 'args' or 'kwargs'. The description adds minimal meaning beyond the schema, leaving the two optional parameters undocumented and unexplained.

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: 'Call a js_api method directly on the Python object exposed to the page.' It specifies the verb 'call' and the resource 'js_api method,' which distinguishes it from siblings like eval_python and eval_js. The example reinforces the intended use.

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

Usage Guidelines3/5

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

The description implies usage when the app exposes a js_api method, with a concrete example. However, it does not explicitly state when not to use this tool or mention alternatives like trigger_action or eval_js. It gives contextual guidance but lacks exclusions or comparisons.

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/com55/pywebview-mcp'

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