tips
Provides actionable recommendations to enhance your device's performance while navigating Map Traveler MCP's virtual journeys on Google Maps.
Instructions
Inform you of recommended actions for your device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/McpService.ts:465-488 (handler)The primary handler for the MCP 'tips' tool. It invokes StoryService.tips(), joins the text list, and attaches images as base64 if available, returning formatted tool content.const tips = () => { return Effect.gen(function* () { const res = yield* StoryService.tips() const content = [{type: "text", text: res.textList.join('\n-------\n')} as ToolContentResponse] if (res.imagePathList.length > 0) { yield* Effect.forEach(res.imagePathList, a => { return Effect.async<Buffer, Error>((resume) => fs.readFile(path.join(__pwd, a), (err, data) => { if (err) { resume(Effect.fail(err)) } resume(Effect.succeed(data)); })).pipe(Effect.andThen(b => { content.push({ type: "image", data: Buffer.from(b).toString('base64'), mimeType: 'image/png' } as ToolContentResponse) })) }) } return content } ) }
- src/StoryService.ts:168-273 (helper)Core logic generating tips text based on system configuration (practice mode, db setup, API keys, Python/rembg, SNS accounts, etc.). Returns textList and imagePathList.const tips = () => { // informationの文 // 1. practiceモードであればそれを示す 解除にはGoogle map api keyが必要であることを示す // 2. dbパスを設定するとアプリを終了しても現在地と行き先が記録されることを示す // 2. 画像AIのkeyがなければ 画像API keyがあればアバターの姿を任意に作れることを示す // 3. pythonがインストールされていなければ pythonをインストールするとアバターの姿を合成できる // // 以下はランダムで表示 // - 画像AIのkeyがあってかつpromptを変更したことがなければ変更可能を案内する // - snsアカウントがあればpostが出来ることを案内する // - bsアカウントがあれば相互対話が出来ることを案内する // - 二人称モードに切り替えると二人称会話で操作できる(ただし可能な限り) // - リソースに詳細があるのでリソースを取り込むと話やすい。プロジェクトを起こしてある程度会話を調整できる return Effect.gen(function *() { const textList: string[] = [] const imagePathList: string[] = [] const runnerEnv = yield *DbService.getSysEnv() if (runnerEnv.mode.isPractice) { textList.push('Currently in practice mode. You can only go to fixed locations.' + ' To switch to normal mode, you need to obtain and set a Google Map API key.' + ' key for detail: https://developers.google.com/maps/documentation/streetview/get-api-key ' + ' Need Credentials: [Street View Static API],[Places API (New)],[Time Zone API],[Directions API]' + ' Please specify the API key in the configuration file(claude_desktop_config.json).' + ' And restart app. Claude Desktop App. Claude App may shrink into the taskbar, so please quit it completely.\n' + `claude_desktop_config.json\n \`\`\` "env":{"GoogleMapApi_key":"xxxxxxx"} \`\`\` ` ) } else { if (runnerEnv.mode.dbMode === "memory") { textList.push('Since the database is not currently set, the configuration information will be lost when you exit.' + ' Please specify the path of the saved database file in the configuration file(claude_desktop_config.json).' + `claude_desktop_config.json\n \`\`\` "env":{"sqlite_path":"%USERPROFILE%/Desktop/traveler.sqlite"} \`\`\` Or set a db connection. Please refer to README.md.` ) } else { if (!runnerEnv.useAiImageGen) { textList.push('If you want to synthesize an avatar image, you will need a key for the image generation AI.' + ' Currently, PixAi and Stability AI\'s SDXL 1.0 API are supported.' + ' Please refer to the website of each company to obtain an API key.' + ' https://platform.stability.ai/docs/getting-started https://platform.stability.ai/account/keys ' + ' https://pixai.art/ https://platform.pixai.art/docs/getting-started/00---quickstart/ ' + ' Please specify the API key in the configuration file(claude_desktop_config.json).' + `claude_desktop_config.json\n \`\`\` "env":{"pixAi_key":"xyzxyz"} or "env":{"sd_key":"xyzxyz"} \`\`\` ` ) } const enableRembg = yield *ImageService.isEnableRembg(runnerEnv) if (!enableRembg) { textList.push('In order to synthesize avatar images, your PC must be running Python and install rembg.' + ` Please install Python and rembg on your PC using information from the Internet.\n \`\`\` "env":{"rembgPath":"(absolute path to rembg cli)"} \`\`\`\n or \`\`\` "env":{"rembgUrl":"(rembg service API url)"} \`\`\`\n To keep your pc environment clean, I recommend using a Python virtual environment such as venv. Or set a Rembg API, Please refer to README.md.`) } // 基本動作状態 const bsEnable = runnerEnv.bs_id && runnerEnv.bs_pass && runnerEnv.bs_handle if (!bsEnable) { textList.push('Optional: Set up a Bluesky SNS account\n' + 'By setting your registered address, password, and handle for Bluesky SNS, you can post travel information on the SNS and obtain and interact with other people\'s travel information.\n' + 'Since articles may be posted automatically, we strongly recommend using a dedicated account.\n' + `claude_desktop_config.json\n \`\`\` "env":{ "bs_id":"xxxx", "bs_pass":"yyyyy", "bs_handle":"zzzz" } \`\`\` ` ) } else { if (runnerEnv.extfeedTag && !runnerEnv.isEnableFeedTag) { textList.push('I detected an external feed tag "MT_FEED_TAG", but it was not used. external feed tags must start with a # and be at least 15 characters long.\n') } } if (!runnerEnv.mode.promptChanged && !runnerEnv.mode.fixedModelPrompt) { textList.push('You can change the appearance of your avatar by directly telling the AI what you want it to look like, or by specifying a prompt to show its appearance with set_avatar_prompt.\n') } textList.push('You can play a tiny role play game using the scenario in carBattle.txt. Have fun!') } } return { textList, imagePathList } }) }
- src/McpService.ts:138-144 (schema)Tool schema definition: no input parameters required, provides title and description.name: "tips", // pythonがあったらよいとか、db設定がよいとか、tipsを取得する。tipsの取得を行うのはproject側スクリプトとか、script batchとか title: "Tips for using this MCP server", description: "Inform you of recommended actions for your device", inputSchema: { type: "object", properties: {} }
- src/McpService.ts:1014-1015 (registration)Registers the handler in the tool switch statement for dispatching 'tips' calls.case "tips": return tips()
- src/McpService.ts:1138-1142 (registration)Registers the dynamic tools list handler, which includes the 'tips' tool via makeToolsDef.server.setRequestHandler(ListToolsRequestSchema, async () => { return await DbService.getSysMode().pipe(Effect.andThen(env => makeToolsDef(env)), aiRuntime.runPromise ) });