원클릭으로
mcp-filter-api-design
Design filter/enum parameters for MCP tools consumed by LLM clients, balancing expressiveness with discoverability.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Design filter/enum parameters for MCP tools consumed by LLM clients, balancing expressiveness with discoverability.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Investigate .NET CI failures using the hlx CLI tool via bash. USE FOR: checking Helix job status, searching build logs, downloading test results, AzDO build timeline analysis — when MCP tools aren't loaded, when the MCP server isn't configured or fails to start, or when scripting with JSON output and jq. DO NOT USE FOR: tasks where Helix/AzDO MCP tools are already available in context (prefer ci-analysis skill when MCP server is loaded). INVOKES: bash (hlx CLI commands with --json output).
{what this skill teaches agents}
Audit pattern for comparing WorkItemSummary (list API) fields against WorkItemDetails (per-item API) after a Helix.Client SDK bump
Domain-layer normalizer + JSON-stable cache key pattern for filter types with server-side defaults and case-insensitive fields.
Strict unknown-parameter rejection for MCP tools: Stage A (UnmappedMemberHandling.Disallow) + Stage B (did-you-mean CallToolFilter).
Audit MCP/CLI tool parameter surface against underlying REST API capabilities to find silently-dropped params.
| name | mcp-filter-api-design |
| description | Design filter/enum parameters for MCP tools consumed by LLM clients, balancing expressiveness with discoverability. |
| domain | mcp-server-design |
| confidence | medium |
| source | earned |
Use this when adding or redesigning filter parameters on MCP tools — especially when the underlying data model has multiple orthogonal filtering dimensions (e.g., state vs result vs issues). The goal is a filter API that LLMs can use correctly without domain expertise.
When the underlying data has N independent axes, do NOT expose N separate parameters if:
state=pending + result=failed is contradictory)AllowedValues, not a human reading docsInstead, use a single enum parameter whose values are named presets, each mapping to a documented (axis₁, axis₂, …) predicate.
Preset names ARE the documentation for LLM consumers. 'running' beats 'in-progress'; 'failed' beats 'non-succeeded'. Match the mental model of the caller, not the API's enum names.
Adding new enum values to AllowedValues is backward-compatible. Renaming parameters, changing defaults, or splitting one parameter into two is a schema break that forces all callers to update.
If 'failed' is the default and existing callers rely on it, don't change the default even if a new preset would be "better." Add the new preset and let callers opt in.
When multiple tools use the same filter axis, extract the predicate into a shared helper (e.g., MatchesFilter(record, filterValue)) rather than duplicating switch logic. The helper becomes the single source of truth for what each preset means.
If a filter narrows records to a subset, the parent-walk logic (including ancestor records for context) should apply uniformly to all non-'all' presets. Don't make parent walking preset-specific unless there's a strong reason.
state (pending/inProgress/completed) and result (succeeded/failed/…). Rather than exposing state and result as two params, use presets: 'failed', 'running', 'pending', 'incomplete', 'issues', 'all'.State (Running/Passed/Failed/…). Rather than a free-text state filter, use presets: 'failed' (default), 'all', 'running'.filter param that conflates orthogonal concepts without documenting the predicate mapping (the original 'failed' | 'all' bug)'strict' or 'advanced' mode that changes how other params are interpreted'all' when most callers want a narrowed view — forces every caller to add a filter