start_traveler_journey
Initiate a virtual journey on Google Maps using an avatar, enabling guided travel with photo reports and SNS integration for enhanced tracking and sharing.
Instructions
Start the traveler's journey to destination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/RunnerService.ts:610-641 (handler)Core handler function that implements the 'start_traveler_journey' tool logic. It initializes the journey by setting run status to 'running', generates a departure hotel image if applicable, clears destination env vars, saves status to DB, and returns journey start message with optional image.function startJourney(practice = false) { return Effect.gen(function* () { const now = dayjs(); let rs: RunStatus if (practice) { rs = yield* DbService.practiceRunStatus(true) } else { const {runStatus} = yield* getRunStatusAndUpdateEnd(now).pipe(Effect.tap(a => { if ((["running", "vehicle"] as TripStatus[]).includes(a.runStatus.status as TripStatus)) { // 旅は継続しているので旅中で報告する return Effect.fail(new AnswerError(`already start journey.You may stop or continue the journey`)); } })); rs = yield *setStart(runStatus,now) } // 旅開始ホテル画像、旅開始挨拶 const runnerEnv = yield* DbService.getSysEnv() const useAiImageGen = runnerEnv.useAiImageGen const hour = now.tz(rs.startTz!).hour() const image1 = yield* ImageService.makeHotelPict(useAiImageGen, hour).pipe( Effect.andThen(a => Effect.succeed(Option.some(a))), Effect.orElseSucceed(() => Option.none())); yield* DbService.saveEnv("destination", "") yield* DbService.saveEnv("destTimezoneId", "") yield* DbService.saveRunStatus(rs) return { text: `We set out on a journey. The departure point is "${rs.from}". I'm heading to "${rs.to}".`, image: image1 } }) }
- src/McpService.ts:658-672 (handler)Wrapper handler in McpService that calls RunnerService.startJourney and formats the ToolContentResponse with text and optional image.const startJourney = (env:Mode) => { return RunnerService.startJourney(env.isPractice).pipe( Effect.andThen(a => { const out: ToolContentResponse[] = [{type: "text", text: a.text}] if (Option.isSome(a.image)) { out.push({ type: "image", data: a.image.value.toString("base64"), mimeType: 'image/png' }) } return out }) ) }
- src/McpService.ts:1044-1047 (handler)Tool dispatcher switch case that routes 'start_traveler_journey' calls to the startJourney handler.case "start_journey": case "start_traveler_journey": return startJourney(env) case "stop_journey":
- src/McpService.ts:226-233 (schema)Tool schema definition: conditionally names the tool 'start_traveler_journey' (when personMode !== 'second'), provides title, description, and empty input schema.name: env.personMode === 'second' ? "start_journey" : "start_traveler_journey", title: "Start the journey", description: env.personMode === 'second' ? "Start the journey to destination" : "Start the traveler's journey to destination", // スタートと合わせてスタートシーン画像を取得して添付する inputSchema: { type: "object", properties: {}, } },
- src/McpService.ts:433-434 (registration)Registers START_STOP_COMMAND (containing 'start_traveler_journey') into the tools list in makeToolsDef when moveMode !== 'skip'.cmd.push(...START_STOP_COMMAND) }