Skip to main content
Glama

Swift Language Reference chapter

apple_swift_book_get
Read-onlyIdempotent

Retrieve a chapter from The Swift Programming Language book by slug, covering Language Guide and Reference. Search with wwdc_search first to find the slug.

Instructions

Retrieve a chapter from The Swift Programming Language book (docs.swift.org). Covers Language Guide (closures, concurrency, generics…) and Language Reference (grammar, declarations, attributes). Search with wwdc_search first to find the slug.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoResponse formatmarkdown
chapterYesChapter slug, e.g. 'concurrency', 'generics', 'closures'. Use wwdc_search to discover slugs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds the source host (docs.swift.org) and the prerequisite discovery step, but says nothing about response size, pagination, or failure behavior for a bad slug.

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?

Two compact sentences with zero waste; the retrieval purpose is front-loaded and the prerequisite guidance follows. Every clause carries information.

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 only 2 params, full schema coverage, annotations covering safety, and no output schema, the description is nearly sufficient for correct invocation. The only minor gap is not contrasting the markdown vs json formats, which the schema enum already implies.

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%, so both parameters (chapter slug, format enum with default) are already documented in the schema, including the wwdc_search hint. The description largely restates the schema rather than adding new format/syntax detail, so the 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?

Specific verb+resource ('Retrieve a chapter from The Swift Programming Language book') plus the content scope it covers (Language Guide and Language Reference). This clearly separates it from general doc tools like apple_doc_get and from the evolution-specific apple_swift_evolution_get sibling.

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: 'Search with wwdc_search first to find the slug,' which is a concrete prerequisite for successful invocation. It stops short of stating when-not to use this tool versus other retrieval siblings, so it is clear context without exclusions.

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