Skip to main content
Glama

get-excel-used-range

Read-only

Determine the smallest range containing data or formatting on an Excel worksheet to locate populated cells before reading or appending data.

Instructions

Invoke function usedRange

💡 TIP: Get the smallest range that encompasses any cells with values or formatting on the worksheet. Returns address, values, formulas, numberFormat, rowCount, columnCount. Use this to discover the populated bounds of a sheet before reading or appending — avoids guessing how far data extends. Optional $select to trim the response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
driveIdYesPath parameter: driveId
driveItemIdYesPath parameter: driveItemId
workbookWorksheetIdYesPath parameter: workbookWorksheetId
fetchAllPagesNoFollow @odata.nextLink and merge up to 100 pages into one response. Can return enormous payloads—only when the user explicitly needs a full export. Prefer a small $top first, then paginate or narrow with $filter/$search.
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
Behavior4/5

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

Annotations declare readOnlyHint and destructiveHint (true/false) – the description reinforces non-destructive behavior and adds context about returning multiple properties. No contradictions.

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?

Fairly concise: two sentences plus a tip. The opening phrase 'Invoke function usedRange' is slightly awkward but does not harm clarity. Sentences are front-loaded with key info.

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?

No output schema exists, but the description enumerates return fields. It explains purpose, usage context, and mentions optional $select. Could elaborate on fetchAllPages behavior, but overall sufficient for a read-only exploratory tool.

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 covers all 6 parameters at 100% coverage. The description adds value by mentioning the optional $select query string, which is not in the schema, aiding agents in trimming responses.

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 retrieves the smallest populated range in a worksheet, listing returned fields (address, values, formulas, etc.). It distinguishes from siblings like get-excel-range by positioning itself as a discovery tool before reading or appending.

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?

Explicitly advises using this to discover populated bounds before reading or appending, providing clear context. Implicitly suggests alternatives when a specific range is known, but does not name alternatives directly.

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/Softeria/ms-365-mcp-server'

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