Skip to main content
Glama
Flux-Frontiers

SwiftKG MCP Server

query_codebase

Find Swift code by natural-language queries combined with structural graph search. Returns ranked nodes from the codebase graph based on semantic and relationship relevance.

Instructions

Hybrid semantic + structural query over the Swift codebase graph.

:param q: Natural-language query, e.g. "request retry policy". :param k: Number of semantic seed nodes (default 8). :param hop: Graph expansion hops (default 1). :param rels: Comma-separated edge types to follow. :param max_nodes: Maximum nodes to return (default 25). :param min_score: Minimum semantic score for seed inclusion in [0, 1]. :param max_per_module: Maximum nodes per module (default 3; 0 disables). :param rerank_mode: 'hybrid' (default), 'semantic', or 'legacy'. :param rerank_semantic_weight: Semantic weight for hybrid mode (default 0.7). :param rerank_lexical_weight: Lexical weight for hybrid mode (default 0.3). :param format: 'json' (default) or 'markdown'. :return: JSON string or Markdown table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
qYes
hopNo
relsNoCONTAINS,CALLS,IMPORTS,INHERITS,CONFORMS,EXTENDS
formatNojson
max_nodesNo
min_scoreNo
rerank_modeNohybrid
max_per_moduleNo
rerank_lexical_weightNo
rerank_semantic_weightNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the hybrid semantic+structural approach, graph expansion behavior, rerank modes, and output format, which goes beyond the schema. It does not mention side effects or auth, but the tool is clearly a read-style query operation.

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?

The summary line is front-loaded and the parameter list is systematically formatted. It is somewhat long, but given 11 parameters, each documented line earns its place. No irrelevant filler is present.

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?

Given the high parameter count and the presence of an output schema, the description is nearly complete: every parameter is explained and the return type is stated. It lacks examples and usage guidance relative to sibling tools, but an agent can invoke it correctly from the provided information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 fully compensate. It documents all 11 parameters, including defaults, allowed values, and semantics for q, k, hop, rels, max_nodes, min_score, max_per_module, rerank modes, weights, and format. This is exemplary compensation for an empty 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 action: hybrid semantic + structural query over the Swift codebase graph. This is clear and resource-specific, but it does not differentiate itself from closely related siblings like query_ranked or rank_nodes.

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

Usage Guidelines2/5

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

The description explains what the tool does and its parameters, but provides no guidance on when to choose it over sibling tools. With many related query/ranking tools present, explicit alternatives or selection criteria are missing.

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