stop_traveler_journey
Halt the virtual traveler’s journey on the Map Traveler MCP server. Use this tool to pause or end the avatar’s movement, stopping photo reports and SNS updates during mapped travels.
Instructions
Stop the traveler's journey
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/RunnerService.ts:643-673 (handler)Primary handler: Stops the journey by calculating current position, resetting run status to 'stop', generating location view with facilities and image, and saving the updated status.function stopJourney(practice: boolean) { return Effect.gen(function* () { const now = dayjs() const {runStatus} = yield* getRunStatusAndUpdateEnd(now) if (runStatus.status === "stop") { return yield* Effect.fail(new AnswerError(`The journey has already arrived in "${runStatus.to}".`)); } let res if (practice) { res = yield* getFacilitiesPractice(runStatus.to, true).pipe(Effect.andThen(a => runningReport(a.locText, a.nearFacilities, a.image, true))) } else { const runnerEnv = yield* DbService.getSysEnv() const elapse = Math.min(now.diff(runStatus.startTime, "seconds") / dayjs.unix(runStatus.tilEndEpoch).diff(runStatus.startTime, "seconds"), 1) const currentInfo = yield* calcCurrentLoc(runStatus, elapse); // これは計算位置情報 const nears = yield* StoryService.getNearbyFacilities({ lat: currentInfo.lat, lng: currentInfo.lng, bearing: currentInfo.bearing }) resetRunStatus(runStatus, Option.getOrElse(nears.address, () => runStatus.to), now.toDate(), currentInfo.lat, currentInfo.lng, Option.getOrElse(nears.country, () => runStatus.endCountry), currentInfo.timeZoneId) res = yield* getFacilities(currentInfo, runnerEnv, true, false).pipe(Effect.andThen(a => runningReport(a.locText, a.nearFacilities, a.image, true))) } runStatus.to = Option.getOrElse(res.address, () => runStatus.from) yield* DbService.saveRunStatus(runStatus) return res.out }) }
- src/McpService.ts:1047-1049 (handler)Tool dispatch in switch statement: Maps 'stop_traveler_journey' (and alias) to local stopJourney function.case "stop_journey": case "stop_traveler_journey": return stopJourney(env)
- src/McpService.ts:234-242 (schema)Tool schema definition: Specifies name (conditional on personMode), title, description, and empty input schema.{ name: env.personMode === 'second' ? "stop_journey" : "stop_traveler_journey", title: "Stop the journey", description: env.personMode === 'second' ? "Stop the journey" : "Stop the traveler's journey", // 停泊と合わせて停止シーン画像を取得して添付する inputSchema: { type: "object", properties: {}, } },
- src/McpService.ts:433-434 (registration)Tool registration: Adds START_STOP_COMMAND (containing stop_traveler_journey) to the tools list in makeToolsDef when not in skip mode.cmd.push(...START_STOP_COMMAND) }
- src/McpService.ts:673-675 (handler)Local wrapper: Delegates to RunnerService.stopJourney with practice flag from env.const stopJourney = (env:Mode) => { return RunnerService.stopJourney(env.isPractice) }