Skip to main content
Glama

Read computed style at a text anchor

get_style

Discover the exact formatting applied at any point in a document to fix layout issues, such as unexpected paragraph spacing, by returning the effective paragraph and text styles.

Instructions

Read the effective (inherited-resolved) style at a unique text snippet — read_doc’s markdown can’t express these; the read counterpart to set_style. Returns paragraph style (namedStyleType, alignment, spaceBefore/spaceAfter in pt, lineSpacing %, and whether spacing is inherited) and text style (bold/italic/underline/strikethrough, fontSize pt, fontFamily, color hex, link). Use it to diagnose things markdown hides — e.g. an unexpected gap between paragraphs is spacing (spaceAfter>0), not a blank line, and is fixed with set_style’s spaceAfter, not edit_doc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabNoTarget a specific tab by tabId or title (from list_tabs). Defaults to the first tab.
pageNowhich header/footer, when a doc defines more than one (default-page, first-page, even-page). Omit to use whichever exists.
accountNoGoogle account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account.
segmentNowhich content tree to target: body (default), or the page header/footer. Header/footer content is invisible to a body read — a letterhead logo lives there.
documentIdYes
target_stringYesexact text to read the style of (quote a unique slice from read_doc)
Behavior5/5

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

With no annotations provided, the description carries the full burden and performs well: it explains the return shape (paragraph style with namedStyleType, alignment, spacing in pt, lineSpacing %, inheritance; text style with bold/italic/underline/strikethrough, fontSize pt, fontFamily, color hex, link) and reveals the behavioral nuance of 'effective (inherited-resolved)' style. It also implies read-only by calling it 'read counterpart to set_style', and provides a concrete diagnostic example.

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?

Three sentences, front-loaded with the core purpose, then return details, then a diagnostic use case. Every sentence is informative with no filler. The length is justified given the return value complexity and the need to distinguish from siblings.

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

Completeness5/5

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

The tool has no output schema, so the description compensates by enumerating return fields. It also provides context on why to use it (read_doc can't express styles), which sibling to compare with (set_style), and an example of unexpected spacing. The description is complete for a read tool with schema-documented parameters.

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 high (83%), so baseline is 3. The description adds little beyond schema: it repeats 'unique text snippet' which the schema already says as 'exact text to read the style of (quote a unique slice from read_doc)'. No new meaning is added for tab, page, segment, or account parameters, so the description does not enhance parameter understanding beyond the schema.

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?

The description clearly states the tool reads the effective (inherited-resolved) style at a unique text snippet, differentiating it from read_doc which cannot express such styles, and explicitly identifies it as the read counterpart to set_style. The verb 'Read' and resource 'style at a unique text snippet' are specific, and the mention of sibling tools distinguishes it.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: to diagnose things markdown hides, e.g., an unexpected gap between paragraphs is spacing (spaceAfter>0), not a blank line. It also names alternatives and exclusions: it is fixed with set_style's spaceAfter, not edit_doc, and read_doc's markdown can't express these styles. This provides clear when-to-use and when-not-to-use guidance.

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/dasasian/gdocs-mcp'

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