Skip to main content
Glama

layout_get

Read-onlyIdempotent

Read a .docx page layout plan—section starts, breaks, page numbering, first-page rules, and header/footer text—then pass edits to layout.apply to change the layout. It is read-only.

Instructions

Read the page plan: per section where it starts (from address), its break, page numbering (shown, start, format), first-page difference, and header/footer text per kind (default, first, even) with fields as {PAGE}, {NUMPAGES} and {chapter}; null means inherited from the previous section. Edit it and pass it to layout.apply to change the layout; section.list gives the same setup with header/footer part names instead of text. Read-only.

Input Schema

NameRequiredDescriptionDefault
docYesPath to the .docx.

Output Schema

NameRequiredDescriptionDefault
okYesAlways true on success.
opYesThe operation that ran.
apiYesAPI version (1.0).
docNoThe document read or written: path, sha256 and paragraph count.
nextYesCursor for the next page (pass as cursor), or null.
resultYesWhat the operation returns.
warningsYesThings to know about the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "api": {
      +      "description": "API version (1.0).",
      +      "type": "string"
      +    },
      +    "doc": {
      +      "description": "The document read or written: path, sha256 and paragraph count.",
      +      "properties": {
      +        "characters": {
      +          "description": "text.normalize of a text string: its length.",
      +          "type": "integer"
      +        },
      +        "paragraphs": {
      +          "description": "Body paragraphs.",
      +          "type": "integer"
      +        },
      +        "path": {
      +          "description": "Path of the document.",
      +          "type": "string"
      +        },
      +        "sha256": {
      +          "description": "sha256 of the file (pass as expect.sha256 to a write).",
      +          "type": "string"
      +        },
      +        "source": {
      +          "description": "A .txt/.md/.odt source's format, encoding and split mode; \"text\" for a text string (text.normalize).",
      +          "type": [
      +            "object",
      +            "string"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "next": {
      +      "description": "Cursor for the next page (pass as cursor), or null.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "ok": {
      +      "description": "Always true on success.",
      +      "type": "boolean"
      +    },
      +    "op": {
      +      "description": "The operation that ran.",
      +      "type": "string"
      +    },
      +    "result": {
      +      "description": "What the operation returns.",
      +      "properties": {
      +        "mirror_margins": {
      +          "description": "Mirrored margins.",
      +          "type": "boolean"
      +        },
      +        "sections": {
      +          "description": "Each section, in order.",
      +          "items": {
      +            "description": "A section of the plan.",
      +            "properties": {
      +              "break": {
      +                "description": "nextPage, oddPage, evenPage or continuous.",
      +                "type": "string"
      +              },
      +              "first_page_different": {
      +                "description": "Different first page.",
      +                "type": "boolean"
      +              },
      +              "footer": {
      +                "description": "Text per kind; {PAGE}, {NUMPAGES} and {chapter} stand for fields; null: inherited.",
      +                "properties": {
      +                  "default": {
      +                    "description": "Default (odd) pages.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "even": {
      +                    "description": "Even pages.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "first": {
      +                    "description": "First page.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "from": {
      +                "description": "Paragraph address, p<n>#<fingerprint> (story-prefixed in notes/headers).",
      +                "type": "string"
      +              },
      +              "header": {
      +                "description": "Text per kind; {PAGE}, {NUMPAGES} and {chapter} stand for fields; null: inherited.",
      +                "properties": {
      +                  "default": {
      +                    "description": "Default (odd) pages.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "even": {
      +                    "description": "Even pages.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "first": {
      +                    "description": "First page.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "numbering": {
      +                "description": "Page numbering.",
      +                "properties": {
      +                  "format": {
      +                    "description": "decimal, lowerRoman, upperRoman, lowerLetter, upperLetter...",
      +                    "type": "string"
      +                  },
      +                  "shown": {
      +                    "description": "A page number is printed (checked, not set).",
      +                    "type": "boolean"
      +                  },
      +                  "start": {
      +                    "description": "Restart value, or null to continue.",
      +                    "type": [
      +                      "integer",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "type": "object"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "two_sided": {
      +          "description": "Different even and odd headers.",
      +          "type": "boolean"
      +        },
      +        "version": {
      +          "description": "Plan format version (1).",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "version",
      +        "two_sided",
      +        "mirror_margins",
      +        "sections"
      +      ],
      +      "type": "object"
      +    },
      +    "warnings": {
      +      "description": "Things to know about the result.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "api",
      +    "ok",
      +    "op",
      +    "result",
      +    "warnings",
      +    "next"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint, so the safety profile is covered; the trailing 'Read-only' largely restates it. The description adds genuine behavioral context beyond the annotations: 'null means inherited from the previous section' and the coupling to layout.apply.

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-loads the core action ('Read the page plan') and packs the field inventory into one dense sentence. It is information-dense rather than padded, though some return-field detail borders on duplicating the output schema.

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?

With a dedicated output schema present, the description needn't explain return structure, yet it still gives enough about scope, inheritance semantics, and sibling relationships for correct invocation. Nothing critical for calling the tool is missing.

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 description coverage is 100% and the single 'doc' parameter is fully documented ('Path to the .docx.'). The description adds no parameter-level detail (formats, constraints) beyond the schema, so baseline 3 applies.

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+resource ('Read the page plan') and enumerates exactly what it returns: per-section start address, break, page numbering, first-page difference, and header/footer text. It also names the sibling it differs from (section.list gives part names instead of text), so an agent can distinguish it without opening schemas.

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 routes the agent: 'Edit it and pass it to layout.apply to change the layout' describes the round-trip workflow, and 'section.list gives the same setup with header/footer part names instead of text' gives the alternative. It stops short of an explicit when/when-not conditional, but the tool relationships are clear.

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