Skip to main content
Glama
Flux-Frontiers

SwiftKG MCP Server

public_api

List public API declarations in a Swift codebase to review what a module exposes and identify public declarations that no longer need to be public.

Instructions

List the declared public API surface.

Swift states access level with a keyword and SwiftKG stores it, so this is a fact read out of the graph rather than a heuristic. Use it to review what a module actually exposes, or to find public declarations that no longer need to be.

:param module_path: Restrict to files under this path prefix. Empty (default) covers the whole repository. :param limit: Maximum declarations to return (1-1000). :return: JSON with count and a declarations list, each carrying its visibility.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
module_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It explains that the result is a fact read from the graph, not a heuristic, and describes the return shape (count and declarations with visibility). It doesn't mention performance, rate limits, or edge cases, but for a read-only listing tool this is solid.

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?

The description is well-structured: a clear first sentence, a rationale sentence, two use cases, and then parameter documentation. Every sentence earns its place, and the key purpose is front-loaded.

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?

The tool has an output schema, so return values are already structured. The description adds the key context: it's a graph fact, not a heuristic, and it covers the two parameters. It could mention whether the result is sorted or how visibility is represented, but it's complete enough for correct invocation.

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 description coverage is 0%, so the description must compensate. It does: it explains module_path restricts to files under a path prefix and that empty covers the whole repository, and limit caps the number of declarations (1-1000). This adds meaning beyond the raw schema.

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?

The description states a specific verb ('List') and resource ('declared public API surface'), and explains what the tool does: it reads a fact out of the graph rather than using a heuristic. It clearly distinguishes itself from siblings like query_codebase or find_node by focusing on public API declarations and their visibility.

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?

The description gives clear use cases: 'review what a module actually exposes' and 'find public declarations that no longer need to be.' It doesn't explicitly name alternatives or say when not to use it, but the context is strong enough for an agent to select it appropriately among siblings.

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