Skip to main content
Glama

disks/partitions

Read-onlyIdempotent

Lists a disk's partitions with start sector and size in sectors and bytes by reading /sys/class/block, without fdisk. Read-only; specify parent disk or omit for all disks.

Instructions

Lists the partitions of a disk with start sector and size in sectors and bytes, read natively from /sys/class/block (no fdisk). Read-only. device names the PARENT DISK (sda, nvme0n1), not a partition; without it every disk's partitions are listed. A sector size of 512 bytes is assumed. It does not report partition type, label, UUID or filesystem: use disks/list or disks/mounts for those, and disks/list to find device names. A named disk without partitions is an error (no partitions found for device). Output is a text table; when output_format is set to any non-empty value (the parameter is accepted although not listed in the schema) it is an indented JSON array of objects (device, parent_disk, number, start_sector, size_sectors, size_bytes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceNoParent disk name such as 'sda' or 'nvme0n1' (not a partition); omit for all disks

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.1
    • changedInput schema / properties / device / description
      Previous value: -"Optional specific block device to query (e.g., 'sda')"New value: +"Parent disk name such as 'sda' or 'nvme0n1' (not a partition); omit for all disks"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the read-only/idempotent safety profile, and the description goes well beyond them: native /sys/class/block read path, the 512-byte sector-size assumption, the error case for a named disk with no partitions, and both output shapes (text table vs indented JSON). This is the kind of behavioral context annotations cannot express.

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?

Front-loaded with the core purpose and read-only note, then the device semantics and alternatives follow in a logical order. It is dense but nearly every clause carries information; only the device restatement slightly duplicates the schema.

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?

With no output schema, the description supplies the return shape (text table or JSON array with named fields), the key assumption (512-byte sectors), and the error behavior. An agent has everything needed to call it correctly and interpret the result.

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% and the schema already documents 'device' as a parent disk name, so the description's re-statement is redundant. It does add value by explaining the omission default and by disclosing an accepted but schema-undocumented output_format parameter, which meaningfully expands the invocation surface.

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 ('Lists the partitions of a disk') plus the exact data returned (start sector, size in sectors and bytes) and the data source (/sys/class/block, no fdisk). It explicitly distinguishes itself from disks/list and disks/mounts, which cover label/UUID/filesystem information.

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?

Gives explicit when-not guidance ('does not report partition type, label, UUID or filesystem: use disks/list or disks/mounts') and routes the agent to disks/list for discovering device names. It also clarifies the meaning of the optional device argument, including the default behavior when omitted.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.