Model Context Protocol server for Delphi/Pascal Language Server Protocol integration. Allows AI assistants to query Delphi code for definitions, references, hover info, completions, and workspace symbols.
This server implements 5 LSP-based tools with reasonable naming (verb-first convention: goto_definition, find_references, hover, completion, workspace_symbols). However, critical definition gaps severely limit production readiness. All tools lack explicit output schema documentation, the code shows they return TMCPToolCallResult but the response structure is not documented for LLMs. Parameter descriptions exist but are minimal (10-30 chars each, below the 72-char baseline for param annotations). The implementation is Delphi/STDIO-only, which is a hard protocol blocker. While tool names follow good conventions and input parameters are typed, the absence of output schema docs and minimal parameter guidance means LLMs cannot plan downstream operations or understand what data will be available after each call. Error handling exists (timeout tracking, retry logic) but is not surface-documented in tool descriptions, agents cannot learn recovery paths from the tool definition alone.
Get code completion suggestions at the given position in a file
Find all references to a symbol at the given position in a file
Navigate to the definition of a symbol at the given position in a file
Get hover information (type, documentation) for a symbol at the given position
Search for symbols in the workspace matching a query pattern
No documented output schema for any tool. Code returns TMCPToolCallResult but LLMs cannot see what fields (e.g., locations, hover info, completion items) will be present or their structure. This blocks LLM planning for multi-step operations and causes context loss between tool calls.
Parameter descriptions are minimal (10-30 characters). Example: 'File URI (file://... format)' for uri param. Baseline is 72 chars. LLMs need context on what URIs are accepted, edge cases (does it auto-open files?), and constraints (relative vs absolute paths).
Tool descriptions under 100 characters. E.g., 'Navigate to the definition of a symbol at the given position in a file' (70 chars). No guidance on WHEN to use this vs other tools, WHAT it returns, or prerequisites (must file be open?). This is 1/3 the 194-char baseline for tool descriptions.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 37 | <=2025-11-25 | v2 |
No error handling documented in tool descriptions. Internal code has timeouts (15s, LSP_RETRY_COUNT=2, LogTiming) and retry logic, but LLMs cannot discover this from the tool definition. Agents do not know if a timeout means 'retry' or 'ask user' or 'give up'.
No pagination support documented or visible in completion and workspace_symbols, which may return large result sets. Code does not show limit caps or offset/page parameters. Returning unbounded lists will blow context windows.
EnsureDocumentOpen() is called by tools but this side effect is not documented in tool descriptions. LLMs do not know that calling goto_definition on a file will auto-open it in the LSP client. This surprises agents and breaks idempotence assumptions.