Skip to main content
Glama

semantic_search

Search Apple developer documentation by natural language intent or API symbol name. Combines keyword and embedding search with rank fusion to find relevant frameworks and symbol definitions.

Instructions

Hybrid search combining SQLite FTS5 lexical search and vector embeddings (local in-process EmbeddingGemma 2 or cloud Gemini) with Reciprocal Rank Fusion (RRF). Search by natural language intent, conceptual query, or API name. If vector embedding provider is unavailable or circuit breaker is open, automatically falls back to lexical search with notice in result text.

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": {
      "query": "<query>"
    },
    "name": "semantic_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesNatural language description of the desired behavior, UI pattern, concept, or symbol name (e.g. "three column sidebar split view diagram", "biometric face id authentication", "NavigationSplitView")
platformNoOptional platform filter (iOS, macOS, watchOS, visionOS)
frameworkNoOptional framework name to scope semantic search (e.g. "SwiftUI", "UIKit", "LocalAuthentication")
maxResultsNoOptional maximum number of results (default 20, max 100)
symbolTypeNoOptional symbol kind filter (struct, class, protocol, func, etc.)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.0
    • changedInput schema / properties / query / description
      Previous value: -"Natural language description of the desired behavior, UI pattern, or concept (e.g. \"three column sidebar split view diagram\", \"biometric face id authentication\")"New value: +"Natural language description of the desired behavior, UI pattern, concept, or symbol name (e.g. \"three column sidebar split view diagram\", \"biometric face id authentication\", \"NavigationSplitView\")"
  2. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full disclosure burden and does well: it explains the hybrid retrieval strategy and, importantly, the degradation path when the embedding provider is unavailable or the circuit breaker is open (automatic fallback to lexical with a notice in result text). It doesn't state cost/latency tradeoffs of local vs. cloud embedding or result ordering guarantees beyond RRF, which keeps it short of a 5.

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?

Three well-ordered sentences: what it is, how to query it, and what happens on failure. The first sentence is dense with implementation detail (FTS5, EmbeddingGemma 2, Gemini, RRF) that is somewhat verbose but still earns its place by explaining behavior and latency characteristics.

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?

For a five-parameter search tool with a fully documented schema and no output schema, the description covers purpose, query shape, and fallback behavior adequately. The only real gap is selection guidance against the sibling search tools and any hint about result shape or ranking interpretation.

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 every parameter (query, platform, framework, maxResults, symbolType) is already documented in the schema, and the baseline of 3 applies. The description's note about natural-language/conceptual/API-name queries adds a bit of meaning to `query` beyond the schema example, but nothing beyond that.

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 names a specific operation (hybrid semantic search) and explains the mechanism behind it (FTS5 lexical + vector embeddings fused with RRF), which is far more informative than a bare name restatement. It stops short of naming or contrasting the sibling `search_symbols`, so an agent still has to infer which search tool to pick.

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?

'Search by natural language intent, conceptual query, or API name' gives useful positive guidance about query style (conceptual vs. exact symbol). However, there is no explicit when-to-use/when-not guidance relative to `search_symbols` or `get_documentation`, so the choice between siblings is left implied.

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