Skip to main content
Glama

run_script_function

Execute a specified function within a Google Apps Script project. Supports passing parameters and running in developer mode for immediate code testing.

Instructions

Execute a function inside an Apps Script project.

Requires the project to have an API-executable deployment configured (Deploy > New deployment > Library/API executable). dev_mode=True runs the latest saved code without needing a fresh deployment — available only to the script's OWN Google account. For managing deployments themselves use manage_deployment. Requires the script.projects OAuth scope plus any scopes the target function needs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYesThe user's Google email address (authenticated account).
script_idYesTarget project ID (must have an API-executable deployment).
function_nameYesName of the top-level function to invoke (e.g. "doWork"). Private/internal helpers cannot be called.
parametersNoOptional positional arguments to pass to the function. Must be JSON-serializable primitives or arrays.
dev_modeNoTrue runs the latest saved code (owner only); False (default) runs the deployed version.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Discloses key traits like deployment requirement, dev_mode ownership, and OAuth scopes, but does not mention potential side effects, error handling, or return value behavior. Since no annotations are present, the description carries the full burden but omits important safety warnings.

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?

Very concise: three sentences covering purpose, prerequisites, dev_mode note, alternative tool, and scopes. Front-loaded and no unnecessary words.

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?

Given no annotations and a complex tool with 5 params, the description covers purpose, prerequisites, alternative, scopes, and param nuances. Missing details on error/timeout handling, but output schema likely fills return value gap. Still solid for agent decision-making.

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?

Input schema has 100% coverage, and the tool description adds context beyond schema: deployment requirement, dev_mode owner-only, and scope needed. This elevates the baseline of 3 to a 4.

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 'Execute a function inside an Apps Script project,' specifying the verb and resource. It distinguishes from siblings like manage_deployment by referencing deployment management separately, ensuring no confusion.

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?

Explicitly states prerequisites (API-executable deployment), dev_mode restrictions (owner only), and directs to manage_deployment for deployment management. Also notes required OAuth scopes, providing clear guidance on when and how to use.

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/HuntsDesk/ve-gws'

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