Skip to main content
Glama

Grep WWDC sample-code refs

wwdc_sample_code_grep
Read-onlyIdempotent

Filter indexed WWDC sample-code references by substring or regex over titles and URLs to find sessions with specific APIs or file types.

Instructions

Filter all indexed sample-code refs by substring/regex over title and URL (e.g. find sessions with .zip or SwiftData). Returns what was searched when nothing matches.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pattern": "<pattern>"
    },
    "name": "wwdc_sample_code_grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
formatNoResponse formatmarkdown
patternYesRegex or literal substring matched against each ref's title and URL.
is_regexNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / pattern / description
      Previous value: -"Regex or literal substring."New value: +"Regex or literal substring matched against each ref's title and URL."
    • addedInput schema / properties / pattern / maxLength
      Added value: +500
  2. First observedv0.2.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, closed-world, non-destructive, so the safety profile is covered. The description adds two genuinely useful behavioral facts beyond that: matching is confined to title and URL, and the tool echoes the search parameters when nothing matches. It does not describe result shape, ordering, or truncation behavior.

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 tight sentences with the matching scope front-loaded and the no-match behavior appended. No filler, no restating the tool name.

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 carries the burden of describing returns, and it only covers the empty-result case ('returns what was searched'). It says nothing about what a match looks like beyond the implied title/URL, and it leaves the `limit` parameter and result formatting (markdown vs json) unexplained.

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 coverage is 50%: `pattern` and `format` are documented in the schema, while `limit` and `is_regex` are not. The phrase 'substring/regex' partially explains the is_regex toggle and confirms pattern targets title and URL, but `limit` (default 20, max 100) is never mentioned in either place, leaving a real gap.

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?

The description uses a specific verb-plus-resource combination ('Filter all indexed sample-code refs') and narrows the scope to matching over 'title and URL', with concrete examples (`.zip`, `SwiftData`). It stops short of naming the sibling wwdc_sample_code_list, so an agent must still infer how grep differs from the plain list tool.

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?

The examples imply when the tool is useful (finding refs that contain a zip file or reference SwiftData), but there is no explicit when-to-use/when-not guidance and no comparison to wwdc_sample_code_list or wwdc_search, which are the obvious alternatives for sample-code lookups.

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