Skip to main content
Glama
mishafyi

Apple Docs 2.0 MCP

Get Sample Code

get_sample_code
Read-only

Search Apple's sample-code library by framework or keywords to find project titles, summaries, and download links for building native Swift apps.

Instructions

Apple's sample-code library: project titles with links and Apple's one-line summaries, grouped by framework; read a project's page, with its Download link, with get_apple_doc_content. framework matches the project's framework in any spelling ("storekit", "Store Kit"); searchQuery matches titles first, then frameworks, paths and summaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
betaNoBeta samples: "include" = all, "exclude" = stable only, "only" = beta only. Default: "include"include
limitNoMax results (default: 50).
frameworkNoFramework filter (case-insensitive). Examples: "SwiftUI", "ARKit", "CoreML". Note: Some samples are under generic categories - use searchQuery for better results.
searchQueryNoSearch keywords. Most effective approach. Examples: "animation", "camera", "machine learning", "widgets".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

readOnlyHint=true already declares this is a safe read. The description adds genuine behavioral context beyond that: results are relevance-ordered with title matches ranked first, then frameworks/paths/summaries. It omits return shape, pagination, and what happens with zero filters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the resource, but the first sentence is a dense run-on mixing output description and a routing hint to get_apple_doc_content. The trailing sentence packs two separate matching rules into one clause chain, which hurts scannability.

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

Completeness3/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 does carry burden and does describe the returned content, but it never mentions pagination despite the limit (max 200) parameter, nor what an unfiltered call returns. Adequate but with visible gaps for a 4-param listing 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 coverage is 100%, so the baseline is 3, but the description goes further by explaining that framework matches in any spelling/fuzzy form ("storekit" vs "Store Kit") and that searchQuery ranking prioritizes titles over frameworks, paths and summaries. It leaves beta/limit semantics to the schema, which is acceptable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource (Apple's sample-code library) and what it returns: project titles, links, one-line summaries grouped by framework, plus the ability to read a project page. It gestures at a sibling (get_apple_doc_content for a project's page) but does not clearly distinguish itself from search_apple_docs or search_wwdc_content.

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

Usage Guidelines3/5

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

Usage is implied through the parameter guidance ('searchQuery matches titles first...') and the pointer to get_apple_doc_content for reading a page, but it never states when to choose this tool over search_apple_docs or search_wwdc_code_examples. No explicit when-not conditions.

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