helix.mcp: Skill for Claude Code

.copilot/skills/mcp-structured-content/SKILL.md

mcp-structured-content is a skill for Claude Code, Codex from lewing/helix.mcp. It costs 20 tokens per session (611 once invoked), scanned A, original, MIT.

A migration pattern for MCP tools, which are program features that let an AI system call an external service, from manually serialized text results to typed structured results. It preserves the existing JSON field names while enabling generated output schemas.

In plain words
What is it for?
Use it when upgrading an MCP server to structured content, defining result types, preserving camelCase JSON fields, and updating error handling. Raw text tools should continue returning plain strings.
Why use it?
It reduces compatibility problems when changing how tool results are returned. It also keeps result types separate from business logic and avoids wrapping raw text, such as logs or file contents, in unnecessary structure.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is lewing/helix.mcp's own configuration. It tells Claude Code and Codex how to work on helix.mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything helix.mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lewing/helix.mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lewing/helix.mcp/main/.copilot/skills/mcp-structured-content/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lewing/helix.mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-structured-content

README.md
[![agentmods](https://agentmods.dev/badge/skills/lewing/helix.mcp/mcp-structured-content.svg)](https://agentmods.dev/skills/lewing/helix.mcp/mcp-structured-content)
Your own site
<a href="https://agentmods.dev/skills/lewing/helix.mcp/mcp-structured-content"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/mcp-structured-content.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 611 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00611
Opus 5 $0.00010 $0.00305
Sonnet 5 $0.00004 $0.00122
Haiku 4.5 $0.00002 $0.00061

Measured 7d ago against content hash d767e19a36b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

mcp-structured-content scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.copilot/skills/mcp-structured-content/SKILL.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

When upgrading an MCP server from manual JSON serialization (Task<string> + JsonSerializer.Serialize) to the SDK's UseStructuredContent = true feature, there is a systematic migration pattern that preserves wire compatibility while gaining auto-generated output schemas.

Patterns

Result Type Placement

Define MCP result types in a separate file (e.g., McpToolResults.cs) — not inline in the tool class or co-located with service-layer models. MCP result types are a presentation concern, distinct from domain models.

Wire Compatibility via JsonPropertyName

Every property on result types MUST have a [JsonPropertyName("camelCaseName")] attribute matching the previous serialized output. The SDK's default naming policy may differ from the manual JsonSerializerOptions that were used before. Explicit attributes make the wire format independent of SDK configuration.

Raw Text Exception

Tools that return raw text content (console logs, file contents) should NOT use UseStructuredContent. Return Task<string> directly. Structured content wrapping adds noise to text that consumers display verbatim.

Error Path Migration

Replace return JsonSerializer.Serialize(new { error = "..." }) with throw new McpException("..."). The MCP SDK translates exceptions into proper error responses. Use McpException for tool-level errors and ArgumentException for parameter validation.

Critical: Service-layer exceptions (e.g., custom domain exceptions like HelixException) are NOT automatically surfaced to MCP clients. The SDK wraps non-McpException exceptions as generic "An error occurred invoking '{tool}'" messages. Tool handlers MUST catch domain exceptions and rethrow as McpException:

try
{
    var result = await _svc.DoSomethingAsync(...);
}
catch (MyDomainException ex)
{
    throw new McpException(ex.Message);
}

Type Naming

Avoid collisions with BCL types (e.g., System.IO.FileInfo) by using domain-specific prefixes (e.g., HelixFileInfo) rather than suffixes or underscores. The C# type name doesn't affect the wire format but should still follow conventions for maintainability.

Read the full file on GitHub · 49 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 49 lines · 20 tokens per session scan A d767e19a36b6

Subscribe to this mod's changes

mcp-structured-content is a skill published in the GitHub repository lewing/helix.mcp (4 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 611 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.