Skip to main content
Glama

Analyze Swift Types

analyze_swift_types
Idempotent

Categorizes analyzed Swift procedure names into classes, structs, enums, protocols, and extensions by decoding manglings or symbol aliases; optional category and case-sensitive pattern filters.

Instructions

Categorize analyzed Swift procedure names using their manglings or same-address Swift symbol aliases. Decodes legacy and literal modern nominal contexts into classes, structs, enums, protocols, and extensions. Preserves provider names and supporting mangled_names; unresolved categories appear in other and in unclassified, which remains inline even under category filters. Returns deduplicated procedure-name counts, not unique source types, plus identification limitations. Optionally select one category and/or apply a case-sensitive literal filter to provider names or supporting manglings; for example, use {category: "structs", pattern: "Pair"}.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pattern": "Account",
      "category": "classes"
    },
    "name": "analyze_swift_types"
  }
}

Input Schema

NameRequiredDescriptionDefault
patternNoCase-sensitive literal filter applied to provider procedure names and their supporting Swift manglings.
categoryNoLimit categorized results to one Swift category; unresolved category observations remain in unclassified.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With annotations already declaring idempotent=true and destructiveHint=false, the description still adds substantial behavior: it discloses that results are deduplicated procedure-name counts rather than unique source types, that identification is limited, and that unresolved categories land in 'other'/'unclassified' and stay inline even under category filters. The only unexplained element is why readOnlyHint=false for what reads as a pure analysis operation (session state?), which would matter at invocation time.

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-loaded with the core action and packed into one tight paragraph with no filler sentences. It is jargon-dense ('nominal contexts', 'same-address Swift symbol aliases') enough that an unfamiliar agent may need a second read, but each sentence 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?

For a two-optional-parameter tool with no output schema, the description covers return semantics (counts), limitations, and filter edge cases thoroughly. The notable omission is invocation context – what state or session must exist for a non-read-only analysis tool to run.

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 the enum and both parameter descriptions are already documented, setting the baseline at 3. The description adds a concrete call example ({category: "structs", pattern: "Pair"}) and clarifies that the pattern matches provider names plus supporting manglings, which is modest added meaning over the schema.

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 verb and resource – categorizing analyzed Swift procedure names by manglings/aliases – and enumerates the output categories (classes, structs, enums, protocols, extensions). It is clearly distinct from a plain demangler like demangle_swift, though it never explicitly contrasts itself with that sibling, so differentiation is implicit rather than stated.

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 guidance is limited to optional parameter behavior ('Optionally select one category and/or apply a case-sensitive literal filter'), which tells the agent how to narrow results but not when this tool is the right choice over demangle_swift or analyze_function. No prerequisites (e.g., whether an active analysis session is required) or when-not conditions are given.

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

Deploy Server

Other Tools