Skip to main content
Glama

script_call

Invoke a method from a loaded script's RPC exports, passing JSON arguments and returning the result or error.

Instructions

Call method on a loaded script's exports.

Args: session: session id name: script name (from script_load) method: the JS-side export to call. Scripts declare exports via rpc.exports = { myFn(arg) { ... } }. args: JSON-serialisable positional arguments timeout_s: RPC timeout (default 10s)

Returns the return value, or the error string when the JS side threw.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionYes
nameYes
methodYes
argsNo
timeout_sNo
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: it calls a JS export, accepts JSON-serialisable args, defaults timeout to 10s, and returns the return value or error string. 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.

Conciseness5/5

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

The description is concise (8 lines) and well-structured with an "Args:" bullet list. Every sentence adds value without repetition or fluff.

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 no output schema or annotations, the description covers all necessary aspects: parameter usage, return value, error handling, and prerequisite (script must be loaded via script_load). It is complete for the tool's purpose.

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?

Despite 0% schema description coverage, the description provides detailed meanings for all 5 parameters: session is session id, name is script name from script_load, method is JS-side export with example, args are JSON-serialisable positional args, timeout_s is RPC timeout with default 10s.

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 uses a specific verb "Call" and identifies the resource as "method on a loaded script's exports". It clearly distinguishes from sibling tools like script_load (loads script) and enumerate_exports (lists exports).

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 implies usage after script_load and explains the role of each parameter (session, name, method, args, timeout_s). It does not explicitly state when not to use it or name alternatives, 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/Heretek-RE/re-frida'

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