Skip to main content
Glama

script.projects.getContent

Retrieve an Apps Script project's source code and file metadata as JSON, optionally for a specific version, to inspect or back up scripts.

Instructions

Gets the content of the script project, including the code source and metadata for each script file [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: create, get, getMetrics, updateContent.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
scriptIdYes[URL path segment] The script project's Drive ID.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters.
versionNumberNo[query parameter] The version number of the project to retrieve. If not provided, the project's HEAD version is returned.

Output Schema

NameRequiredDescriptionDefault
filesNo
scriptIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / scriptId / description
      Previous value: -"The script project's Drive ID."New value: +"[URL path segment] The script project's Drive ID."
    • changedInput schema / properties / versionNumber / description
      Previous value: -"The version number of the project to retrieve. If not provided, the project's HEAD version is returned."New value: +"[query parameter] The version number of the project to retrieve. If not provided, the project's HEAD version is returned."
    • addedInput schema / properties / versionNumber / format
      Added value: +"int32"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "files": {
      +      "items": {
      +        "properties": {
      +          "createTime": {
      +            "type": "string"
      +          },
      +          "functionSet": {
      +            "properties": {
      +              "values": {
      +                "items": {
      +                  "properties": {
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "parameters": {
      +                      "items": {
      +                        "type": "string"
      +                      },
      +                      "type": "array"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "lastModifyUser": {
      +            "properties": {
      +              "domain": {
      +                "type": "string"
      +              },
      +              "email": {
      +                "type": "string"
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "photoUrl": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "source": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "enum": [
      +              "ENUM_TYPE_UNSPECIFIED",
      +              "SERVER_JS",
      +              "HTML",
      +              "JSON"
      +            ],
      +            "type": "string"
      +          },
      +          "updateTime": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "scriptId": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden. It discloses that this is an HTTP GET returning JSON, which implies a read operation, but says nothing about permissions/scopes, whether content can be large, or rate limits. The body-construction sentence is boilerplate not meaningful for a GET.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Purpose is front-loaded and clear. However, the sentence about request bodies being built from typed parameters or body_file is irrelevant boilerplate for a GET endpoint that sends no body, diluting focus.

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?

An output schema exists, so return values need not be explained, and the description identifies the content retrieved. Coverage is complete for the core purpose, though it omits permission/scope context that a no-annotation tool could optionally provide.

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?

Schema coverage is 100%, so the baseline is 3. The description only restates the precedence rule between typed parameters and the params map, adding nothing beyond what the schema already documents for versionNumber or scriptId.

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?

States a specific verb ('Gets the content') and resource ('script project, including the code source and metadata for each script file'), which is precise. It also names siblings, but doesn't explicitly distinguish this tool's purpose from get vs getContent beyond the verb.

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

Usage Guidelines3/5

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

Usage is implied by the verb and the sibling list ('create, get, getMetrics, updateContent'), but there is no explicit when-to-use / when-not guidance. The agent must infer that this is the content-retrieval variant versus the metadata-only 'get'.

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