Skip to main content
Glama

script_add_function

Add custom functions to Google Apps Script files to extend automation capabilities in Google Workspace applications like Sheets, Docs, and Gmail.

Instructions

Add a new function to an existing file. Appends at the end.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_idYes
file_nameYes
sourceYes

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 full burden. It states the action is additive ('Adds', 'Appends') which implies mutation but doesn't disclose permissions needed, whether changes are reversible, error handling, or rate limits. For a mutation tool with zero annotation coverage, this is a significant gap in behavioral context.

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 short sentences with zero waste: 'Add a new function to an existing file. Appends at the end.' Every word adds value, and it's front-loaded with the core purpose. Highly efficient for its content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which reduces need to describe returns) but no annotations and 0% schema coverage, the description is incomplete. It covers the basic action but lacks parameter details, usage context, and behavioral traits needed for a mutation tool. Adequate as a minimal description but with clear gaps.

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. It doesn't explain any parameters (script_id, file_name, source) beyond what the schema provides. No details on format, constraints, or examples are given, leaving parameters largely undocumented despite the tool having 3 required parameters.

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 ('Add a new function') and target ('to an existing file'), with the specific behavior 'Appends at the end.' It distinguishes from siblings like script_edit_function (edits existing) and script_create_file (creates new files). However, it doesn't explicitly mention the resource type (script/function) which siblings clarify.

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 on when to use this tool versus alternatives like script_edit_function for modifying existing functions or script_create_file for creating new files. The description implies usage for adding functions to existing files but doesn't specify prerequisites, constraints, or comparison with sibling tools.

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/LeooNic/gworkspace-mcp'

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