Skip to content

refactor: replace the info suffix on RPC names with get/list - #9

Merged
morinokami merged 1 commit into
mainfrom
refactor/rpc-verb-names
Sep 19, 2026
Merged

morinokami merged 1 commit into
mainfrom
refactor/rpc-verb-names

Conversation

@morinokami

Copy link
Copy Markdown
Owner

Summary

Renames the four RPC queries whose names ended in info. The suffix told a caller nothing the area segment had not already said. The last segment is now a verb, following the shape devframe uses for its own ids (<namespace>:<area>:<fn>, as in devframe:state:read → devframe_state_read). Each verb is the one the tool's description already opens with ("Get …" / "List …").

Before After (RPC id) MCP tool name
astro-devtools:overview:info astro-devtools:overview:get astro-devtools_overview_get
astro-devtools:routes:info astro-devtools:routes:list astro-devtools_routes_list
astro-devtools:actions:info astro-devtools:actions:list astro-devtools_actions_list
astro-devtools:config:info astro-devtools:config:get — (panel-only, not on the MCP surface)

The MCP names change along with the ids because devframe derives them (toAgentToolName turns every run of characters outside [\w-] into _). A verb also leaves room for a second query on the same area, such as a future routes:match. With a bare noun, that would sit awkwardly next to an astro-devtools:routes.

Changes

  • src/types.ts, src/rpc.ts: the renamed keys of AstroDevtoolsRpcFunctions and their definitions. Descriptions and handlers are unchanged.
  • Panels: the useRpcData calls in Overview, Routes, Actions and Config.
  • Tests: unit tests (rpc, devframe, actions-metadata, hooks) and e2e (rpc, server).
  • Docs: the README's MCP section, the user skill skills/astro-devtools/SKILL.md (its tool table and curl example), and the maintainer skill .agents/skills/verify-astro-devtools/.

What stays

  • The payload types (OverviewInfo, RoutesInfo, ActionsInfo, ConfigInfo) keep their names. They sit alongside the existing ProjectInfo.
  • astro-devtools:project:context is unchanged.
  • The package is not on npm yet, so no released version carries the old names.

Verification

  • vp run ready passes: build, sync, check, knip, publint, and the 373 unit tests.
  • vp run playground#e2e passes locally (51 tests), including the MCP tool list and a tools/call against the renamed tools.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rz6UdQD5h8aKSP4KP91912

Every RPC name ended in `info`, which told a caller nothing the area
segment had not already said. Name the last segment with a verb instead,
the way devframe shapes its own ids (`<namespace>:<area>:<fn>`, as in
`devframe:state:read`), taking the verb each tool description already
opens with:

- `astro-devtools:overview:info` → `astro-devtools:overview:get`
- `astro-devtools:routes:info` → `astro-devtools:routes:list`
- `astro-devtools:actions:info` → `astro-devtools:actions:list`
- `astro-devtools:config:info` → `astro-devtools:config:get` (panel-only)

devframe derives the MCP tool names from these ids, so the agent tools
become `astro-devtools_overview_get`, `astro-devtools_routes_list` and
`astro-devtools_actions_list`. A verb also leaves room for a sibling
query on the same area, such as a future `routes:match`.

The payload types (`OverviewInfo`, `RoutesInfo`, …) keep their names,
and `project:context` is left as it is. The package is not on npm yet,
so no released version carries the old names.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rz6UdQD5h8aKSP4KP91912
@pkg-pr-new

pkg-pr-new Bot commented Sep 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/morinokami/astro-devtools@9

commit: 11e99b9

@morinokami
morinokami merged commit f991dbc into main Sep 19, 2026
4 checks passed
@morinokami
morinokami deleted the refactor/rpc-verb-names branch September 19, 2026 14:26
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