fix(27): correct investigate-prompt tool examples and two inaccurate tool descriptions

Code review (27-REVIEW.md) found the Phase 26 investigate prompt template gave
schema-invalid example calls that an agent would follow literally:
- geocode -> geocode_location (correct tool name)
- toggle_layer({pluginId,visible}) -> ({layerId,enabled})
- get_entities_in_region({lat,lon,radiusKm}) -> bounding box ({north,south,east,west})
- get_entity_details({entityId}) -> ({pluginId,entityId})
Plus two descriptions that over-promised handler behavior:
- get_plugin_data: capturedAt is only present when data streamed
- remove_favorite: throws/returns failure on missing record, not silent success

Resolves CR-01, CR-02, WR-01, WR-02 from the Phase 27 code review.
This commit is contained in:
Antigravity AI committed 2026-05-31 17:13:25 +12:00
1 parent fe63154856
commit c8382c04b5
3 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -156,7 +156,7 @@ export function registerFavoritesTools(
description:
"Delete a bookmarked entity from the authenticated user's favorites. " +
"Pair with list_favorites to find the correct entityId before removing. " +
"Limitations: deletes by entityId; silently succeeds if the entity was already removed. " +
"Limitations: deletes by exact entityId; removing an entity that is not currently a favorite returns 'remove_favorite failed' (call list_favorites first to confirm it exists). " +
"Parameters: entityId (string, required). " +
"Output: 'Removed favorite: <entityId>'. " +
"Example: remove_favorite({ entityId: 'AFR123' }).",
+4 -4
View File
@@ -205,7 +205,7 @@ export async function registerOrientationPrompts(
`INVESTIGATION WORKFLOW${place ? `: ${place.toUpperCase()}` : ""}`,
"",
`Step 1 -- Geocode the target`,
` Call: geocode({ query: "${target}" })`,
` Call: geocode_location({ query: "${target}" })`,
` Result: latitude, longitude, display name.`,
` Stop if no result is returned -- the place name may be misspelled or too ambiguous.`,
"",
@@ -219,15 +219,15 @@ export async function registerOrientationPrompts(
` Then call: pan_globe({ lat, lon, alt: 500000 }) to fly to the geocoded coordinates.`,
"",
`Step 4 -- Toggle relevant layers`,
` Call: toggle_layer({ pluginId: "<pluginId>", visible: true }) for each plugin relevant to your query.`,
` Call: toggle_layer({ layerId: "<layerId>", enabled: true }) for each plugin layer relevant to your query.`,
` Wait a moment for the plugin to stream data before querying.`,
"",
`Step 5 -- Query entities in the region`,
` Call: get_entities_in_region({ lat, lon, radiusKm: 50 }) or the plugin-specific tool if available.`,
` Call: get_entities_in_region({ north, south, east, west }) -- a bounding box around the geocoded coordinates -- or the plugin-specific tool if available.`,
` An empty result means the plugin is not streaming data for this region right now -- that is normal.`,
"",
`Step 6 -- Drill into specific entities`,
` Call: get_entity_details({ entityId: "<id>" }) for any entity of interest.`,
` Call: get_entity_details({ pluginId: "<pluginId>", entityId: "<id>" }) for any entity of interest.`,
` Call: focus_entity({ entityId: "<id>" }) to centre the camera on it.`,
].join("\n");
+1 -1
View File
@@ -153,7 +153,7 @@ export function registerDataQueryTools(server: McpServer): void {
"get_plugin_data",
{
description:
"Full data snapshot returning all current entities for one plugin by pluginId. Use to bulk-read a plugin's live state. Limitation: an empty result (count 0) has two distinct causes -- plugin not loaded or not streaming yet (re-call tools/list after the plugin loads), OR no entities matched (plugin loaded but empty); a future emptyReason field will distinguish these. Includes capturedAt timestamp. Example: get_plugin_data({ pluginId: 'earthquakes' })",
"Full data snapshot returning all current entities for one plugin by pluginId. Use to bulk-read a plugin's live state. Limitation: an empty result (count 0) has two distinct causes -- plugin not loaded or not streaming yet (re-call tools/list after the plugin loads), OR no entities matched (plugin loaded but empty); a future emptyReason field will distinguish these. Includes a capturedAt timestamp when the plugin has streamed data (absent for the not-loaded case). Example: get_plugin_data({ pluginId: 'earthquakes' })",
inputSchema: {
pluginId: z.string().describe("The plugin identifier"),
},