Skip to content

feat(mcp): nbox_get accepts ip_address as an alias for ip#46

Merged
lance0 merged 1 commit into
masterfrom
feat-mcp-get-ip-address-alias
Jun 21, 2026
Merged

feat(mcp): nbox_get accepts ip_address as an alias for ip#46
lance0 merged 1 commit into
masterfrom
feat-mcp-get-ip-address-alias

Conversation

@lance0

@lance0 lance0 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Closes the MCP search→get kind asymmetry (review Tier 1 #1).

nbox_search returns kind = "ip_address"; nbox_get canonically uses ip. I diffed the two enums — that's the only divergence (route_target/ip_range/etc. already match). Rather than rename the pinned search output (a CLI --json/MCP contract break), GetKind now accepts ip_address as a non-breaking alias for ip:

  • serde #[serde(alias = "ip_address")] on the tool-arg path
  • from_str fallback for nbox://ip_address/<ref>

So an agent can chain search → get (and the resource URI) without translating the kind. Documented in AGENTS.md / docs/MCP.md; test covers both paths. Gate green (767 lib tests).

nbox_search returns kind="ip_address" (ObjectKind::IpAddress) while nbox_get
canonically uses "ip" — the only kind whose spelling differs between the two
enums (route_target/ip_range/etc. already match). An agent chaining search → get
had to translate it.

Rather than change the pinned search output (a CLI --json/MCP contract), make
GetKind accept ip_address as a non-breaking alias: serde alias on the tool arg +
from_str for nbox://ip_address/<ref>. Documented in AGENTS.md / docs/MCP.md.
Test covers both the tool-arg and resource-URI paths.
@lance0 lance0 merged commit 0a0e84d into master Jun 21, 2026
4 checks passed
@lance0 lance0 deleted the feat-mcp-get-ip-address-alias branch June 21, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant