Skip to main content
Glama

modify_doc_text_tool

Insert or replace text in Google Docs using Apps Script. Specify position or find-replace text to modify document content.

Instructions

Modify text in a Google Doc.

Args: user_google_email: The user's Google email address document_id: The document ID text: Text to insert (or replace with) index: Position to insert text (default: 1, start of document) replace_text: If provided, find and replace this text with 'text'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYes
document_idYes
textYes
indexNo
replace_textNo

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 the full burden of behavioral disclosure. It states the tool modifies text, implying a write operation, but lacks details on permissions required, error handling, or side effects (e.g., whether changes are reversible). The description doesn't mention the output schema, leaving the agent uncertain about the response format. This is a significant gap for a mutation tool.

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 and appropriately sized. It starts with a clear purpose statement, followed by a bullet-point list of parameters with brief explanations. There's no wasted text, and the information is front-loaded. A perfect score would require slightly more detail on usage or behavior, but it's efficient as-is.

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's complexity (5 parameters, mutation operation, no annotations) and the presence of an output schema, the description is moderately complete. It explains parameters well but lacks behavioral context (e.g., permissions, errors) and doesn't reference the output schema. For a mutation tool with no annotations, it should do more to guide the agent on safe and effective use.

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?

The description adds substantial meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose: 'user_google_email: The user's Google email address', 'document_id: The document ID', 'text: Text to insert (or replace with)', 'index: Position to insert text (default: 1, start of document)', and 'replace_text: If provided, find and replace this text with 'text''. This clarifies how parameters interact (e.g., 'replace_text' triggers replacement instead of insertion). However, it doesn't cover all edge cases, such as invalid indices or empty strings.

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 tool's purpose: 'Modify text in a Google Doc.' It specifies the verb ('modify') and resource ('text in a Google Doc'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'append_doc_text_tool' or 'get_doc_content_tool', which would be needed for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'append_doc_text_tool' for appending text or 'search_docs_tool' for finding documents, nor does it specify prerequisites such as authentication or document access. This leaves the agent without context for tool selection.

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