Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Run Script Function

run_script_function
Destructive

Execute a function in your deployed Google Apps Script project by providing script ID, function name, and optional parameters. Run scripts directly from Google Workspace workflows.

Instructions

Executes a function in a deployed script.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dev_modeNoWhether to run latest code vs deployed version
script_idYesThe script project ID
parametersNoOptional list of parameters to pass
deployment_idNoOptional API Executable deployment ID. When supplied, skips the automatic deployment lookup. When omitted, the versioned API Executable deployment with the highest version number is used.
function_nameYesName of function to execute
user_google_emailYesUser's email address

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.28.0
    • removedInput schema / properties / deployment_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / deployment_id / type
      Added value: +"string"
    • removedInput schema / properties / parameters / anyOf
      Removed value: -[
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / parameters / items
      Added value: +{}
    • addedInput schema / properties / parameters / type
      Added value: +"array"
  2. Changed1 schema field changedv1.26.1
    • addedInput schema / properties / deployment_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional API Executable deployment ID. When supplied,\nskips the automatic deployment lookup. When omitted, the versioned\nAPI Executable deployment with the highest version number is used."
      +}
  3. Addedv1.0.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false. The description adds only 'deployed script,' which hints at deployment but does not explain potential side effects, that it runs with the user's credentials, or that it may modify external state. It provides minimal value beyond the annotations.

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 a single sentence, which is efficient and front-loaded. It is appropriately concise for stating the core action, though it omits valuable context. The brevity does not hinder readability.

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?

For a tool that executes arbitrary code with 6 parameters, the description is severely under-specified. It does not explain how to obtain script_id, the meaning of parameters, error handling, or safety warnings. While an output schema exists, the description fails to provide the operational context needed for safe and correct usage.

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

Parameters3/5

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

The input schema has 100% coverage with descriptive parameter definitions. The description adds no additional meaning to any parameters, so it relies entirely on the schema. The baseline of 3 is appropriate since the schema carries the semantic burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: 'Executes a function in a deployed script.' It identifies a specific verb and resource, making the core purpose unambiguous. However, it does not explicitly distinguish itself from sibling tools like manage_script_content or generate_trigger_code, though the action is inherently distinct.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites such as having a deployment ID, authentication requirements, or when to set dev_mode. The agent must infer usage context from the schema alone.

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

Deploy Server

Other Tools