Skip to main content
Glama

drive.comments.create

Creates a comment on a Google Drive file and returns the API response as JSON, requiring the file ID and fields parameter.

Instructions

Creates a comment on a file. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact fields you need, see Return specific fields [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON Comment object accepting anchor, assigneeEmailAddress, author, content, createdTime, deleted, htmlContent, id and 6 more fields; pass it via params or whole via body_file Siblings over the same resource: delete, get, list, update.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
fileIdYes[URL path segment] The ID of the file.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON Comment object.
request_bodyNoRequest body of type Comment: pass it via `params` (merged into the built body) or whole via `body_file`.

Output Schema

NameRequiredDescriptionDefault
idNo
kindNo
anchorNo
authorNo
contentNo
deletedNo
repliesNo
resolvedNo
createdTimeNo
htmlContentNo
modifiedTimeNo
quotedFileContentNo
assigneeEmailAddressNo
mentionedEmailAddressesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / body_file / description
      Previous value: -"Read the request body from this file ('-' for stdin) instead of building one from the parameters."New value: +"Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON Comment object."
    • addedInput schema / properties / request_body
      Added value: +{
      +  "description": "Request body of type Comment: pass it via `params` (merged into the built body) or whole via `body_file`.",
      +  "properties": {
      +    "anchor": {
      +      "type": "string"
      +    },
      +    "assigneeEmailAddress": {
      +      "type": "string"
      +    },
      +    "author": {
      +      "properties": {
      +        "displayName": {
      +          "type": "string"
      +        },
      +        "emailAddress": {
      +          "type": "string"
      +        },
      +        "kind": {
      +          "type": "string"
      +        },
      +        "me": {
      +          "type": "boolean"
      +        },
      +        "permissionId": {
      +          "type": "string"
      +        },
      +        "photoLink": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "content": {
      +      "type": "string"
      +    },
      +    "createdTime": {
      +      "type": "string"
      +    },
      +    "deleted": {
      +      "type": "boolean"
      +    },
      +    "htmlContent": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "kind": {
      +      "type": "string"
      +    },
      +    "mentionedEmailAddresses": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "modifiedTime": {
      +      "type": "string"
      +    },
      +    "quotedFileContent": {
      +      "properties": {
      +        "mimeType": {
      +          "type": "string"
      +        },
      +        "value": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "replies": {
      +      "items": {
      +        "properties": {
      +          "action": {
      +            "type": "string"
      +          },
      +          "assigneeEmailAddress": {
      +            "type": "string"
      +          },
      +          "author": {
      +            "properties": {
      +              "displayName": {
      +                "type": "string"
      +              },
      +              "emailAddress": {
      +                "type": "string"
      +              },
      +              "kind": {
      +                "type": "string"
      +              },
      +              "me": {
      +                "type": "boolean"
      +              },
      +              "permissionId": {
      +                "type": "string"
      +              },
      +              "photoLink": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "content": {
      +            "type": "string"
      +          },
      +          "createdTime": {
      +            "type": "string"
      +          },
      +          "deleted": {
      +            "type": "boolean"
      +          },
      +          "htmlContent": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "mentionedEmailAddresses": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "modifiedTime": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "resolved": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / fileId / description
      Previous value: -"The ID of the file."New value: +"[URL path segment] The ID of the file."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "anchor": {
      +      "type": "string"
      +    },
      +    "assigneeEmailAddress": {
      +      "type": "string"
      +    },
      +    "author": {
      +      "properties": {
      +        "displayName": {
      +          "type": "string"
      +        },
      +        "emailAddress": {
      +          "type": "string"
      +        },
      +        "kind": {
      +          "type": "string"
      +        },
      +        "me": {
      +          "type": "boolean"
      +        },
      +        "permissionId": {
      +          "type": "string"
      +        },
      +        "photoLink": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "content": {
      +      "type": "string"
      +    },
      +    "createdTime": {
      +      "type": "string"
      +    },
      +    "deleted": {
      +      "type": "boolean"
      +    },
      +    "htmlContent": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "kind": {
      +      "type": "string"
      +    },
      +    "mentionedEmailAddresses": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "modifiedTime": {
      +      "type": "string"
      +    },
      +    "quotedFileContent": {
      +      "properties": {
      +        "mimeType": {
      +          "type": "string"
      +        },
      +        "value": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "replies": {
      +      "items": {
      +        "properties": {
      +          "action": {
      +            "type": "string"
      +          },
      +          "assigneeEmailAddress": {
      +            "type": "string"
      +          },
      +          "author": {
      +            "properties": {
      +              "displayName": {
      +                "type": "string"
      +              },
      +              "emailAddress": {
      +                "type": "string"
      +              },
      +              "kind": {
      +                "type": "string"
      +              },
      +              "me": {
      +                "type": "boolean"
      +              },
      +              "permissionId": {
      +                "type": "string"
      +              },
      +              "photoLink": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "content": {
      +            "type": "string"
      +          },
      +          "createdTime": {
      +            "type": "string"
      +          },
      +          "deleted": {
      +            "type": "boolean"
      +          },
      +          "htmlContent": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "mentionedEmailAddresses": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "modifiedTime": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "resolved": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that this is an HTTP POST that "creates or triggers a change", that it is blocked under readonly safety profiles, and the return shape (API response resource as JSON). It omits permission/auth requirements for commenting on a shared file, which is the main remaining gap.

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?

Purpose is front-loaded in the first sentence, and the safety/return/body notes follow in a sensible order. The field enumeration trailing off as "id and 6 more fields" plus two doc links add mild noise, keeping it from a 5.

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?

For a mutation tool with zero annotations and a nested request body, the description covers mutability, safety-profile refusal, body construction paths, and return type; an output schema also exists so return values need little explanation. Only the authorization prerequisite for commenting is missing.

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 coverage is 100%, so baseline is 3, but the description adds value: it explains the Comment body's key fields, the two ways to supply it (`params` merge vs. whole `body_file`), and flags the `fields` requirement that does not appear as a schema property. That last point is important and non-obvious, though the agent must infer `fields` goes through `params`.

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?

States a specific verb and resource ("Creates a comment on a file") and enumerates the same-resource siblings (delete, get, list, update) so an agent can place it in the CRUD family without opening another schema. The purpose is unambiguous against the listed sibling set.

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

Usage Guidelines4/5

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

Gives a real precondition ("the `fields` parameter must be set") and a when-not condition ("refused under --readonly safety profiles"), plus the sibling list for alternatives. It stops short of saying when to create a comment versus a reply via drive.replies.create, but the usage context is clear.

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