Skip to main content
Glama

update_script_content_tool

Modify or create files in Google Apps Script projects to update code, HTML, or JSON content programmatically.

Instructions

Update or create files in a script project.

Args: script_id: The script project ID files: List of file objects, each with: - name: File name (e.g., "Code", "Utils") - type: File type ("SERVER_JS", "HTML", or "JSON") - source: File content as string

Example files parameter: [{"name": "Code", "type": "SERVER_JS", "source": "function main() { Logger.log('Hello'); }"}]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_idYes
filesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action ('Update or create files'). It lacks critical behavioral details: whether this overwrites existing files, requires specific permissions, handles errors, or affects script execution. For a mutation tool, this leaves significant gaps in understanding its effects and constraints.

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 well-structured with a clear purpose statement, labeled arguments, and a helpful example. Every sentence adds value, and it's front-loaded with the core action. The example is concise but illustrative, though the formatting could be slightly more streamlined.

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 2 parameters with 0% schema coverage and an output schema present, the description adequately covers parameter semantics but lacks behavioral context for a mutation tool. It doesn't explain what 'update or create' entails operationally or address potential side effects. The output schema reduces the need to describe returns, but overall completeness is moderate due to missing usage and transparency details.

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?

Schema description coverage is 0%, so the description must compensate. It effectively explains both parameters: 'script_id' as the project ID and 'files' as a list with detailed structure (name, type, source). The example clarifies the 'files' format, adding substantial meaning beyond the bare schema. However, it doesn't specify allowed file types beyond the example or constraints on 'script_id'.

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 ('Update or create files') and resource ('in a script project'), making the purpose immediately understandable. It distinguishes from siblings like 'create_script_project_tool' by focusing on file content rather than project creation, though it doesn't explicitly contrast with 'get_script_content_tool' or 'create_version_tool'.

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 about when to use this tool versus alternatives like 'create_version_tool' for versioning or 'get_script_content_tool' for reading. The description assumes the user knows they need to modify script files, offering no context about prerequisites, typical workflows, or exclusion criteria.

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/sam-ent/appscript-mcp'

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