MCP payload modes
Understand the 1.2.1 JSON text fallback, optional structured-mode summary, measured duplication and compact-key limits.
Signalint 1.2.1 supports three MCP tool-result transport modes; both is the default. The patch release changes serialization: structured is no longer a summary-only text channel.
Modes at a glance
Section titled “Modes at a glance”| Mode | content[0].text for checks/detail | Second content block | structuredContent | Advertised tool outputSchema |
|---|---|---|---|---|
both — default | Minified JSON equal to JSON.stringify(structuredContent) | None | Complete object; detail arrays wrapped in { issues: [...] } | Present |
text | Minified original payload; successful detail is a JSON array | None | Omitted | Omitted for all 13 tools |
structured | Same minified JSON fallback as both | Human summary with annotations.audience: ["user"] | Complete object | Present |
Ping remains an exception: its first text is literal pong in every mode. text ping omits the structured project root; the other modes also return { pong: true, projectRoot }. Do not try to JSON-parse ping’s first block.
Checks/detail in both and structured duplicate the data across text and structured channels. The latter adds a summary block as well. On the audited 1.2.1 fixtures, structured costs more wire bytes than both, not less. Select a mode for the host’s behavior, not an assumed universal size ranking.
Configure the mode
Section titled “Configure the mode”In the checked project’s signalint.config.json:
{ "mcpPayload": "both" }Or set the server environment:
SIGNALINT_MCP_PAYLOAD=text npx --no-install signalint-mcpThis launches a stdio server, not a terminal diagnostic command. Configure the environment through your client and reconnect; Windows uses its own environment syntax.
Precedence remains non-empty environment → server option/config → default both. Environment whitespace is trimmed, names are case-sensitive, and invalid nonempty values/config fields fail parsing. The active server mode is captured at creation. signalint doctor inspects the resolvable configuration, not an existing server handshake or full editor integration.
Choose based on your client
Section titled “Choose based on your client”- Start with
bothwhile verifying the root and client result handling. - Use
textafter confirming the host forwards the JSON diagnostics to the model. It has no structured result or advertised output schema; recheck the root through stderr or an appropriate full result. - Use
structuredwhen its structured object and additional user-facing summary are useful. Text-consuming clients now receive diagnostic JSON in the first block, but host-version compatibility is not independently certified by this site.
Closed advertised output schemas and upstream Ajv tests are not a promise that every raw server response is runtime-Ajv-validated. The server parses arguments with Zod; validating clients can reject nonconforming result shapes. In particular, review the compact and post-apply exception paths before assuming universal output-schema coverage.
Compact keys are a separate setting
Section titled “Compact keys are a separate setting”SIGNALINT_COMPACT=1 / CLI --compact abbreviate check keys (v, total, remaining, omitted, filteredOut) and omit projectRoot. They are not payload modes.
The 1.2.1 human-summary helper still reads totalIssues, not compact total. A compact positive check can therefore produce 0 issues found. in the second structured-mode summary block. The first JSON block and structured object still contain the compact fields. Do not use that human sentence as the count authority.
Retained-check construction still reads normal-key totals/remaining records; compact snapshot metadata can lose those fields while normalized issues remain retained. Closed structured check schemas do not declare compact aliases. Prefer normal keys for snapshot/validating structured integrations; compact CLI/text support does not certify every handler combination.
Measure the actual object
Section titled “Measure the actual object”The benchmark reference separates standalone representations, serialized CallToolResult values, and captured JSON-RPC response lines.
| Fixture | both result | text result | structured result |
|---|---|---|---|
sparse | 894 B | 487 B | 970 B |
systemic-ts | 1,064 B | 573 B | 1,142 B |
mixed-app | 2,594 B | 1,392 B | 2,672 B |
scale-app | 6,718 B | 3,611 B | 6,796 B |
These are observed 1.2.1 JSON.stringify(CallToolResult) bytes, not complete session traffic, model tokens or latency. Absolute project-root text and fixture/serialization choices affect them. Only text reduced these fixture results relative to both; a small/weakly grouped result can still exceed native output.