Skip to main content
Glama

Get the current location's view

get_traveler_view_info

Retrieve the current traveler's location address, nearby facilities, and optional scenery photos to enhance virtual journey insights on Map Traveler MCP.

Instructions

Get the address of the current traveler's location and information on nearby facilities,view snapshot

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNearbyFacilitiesNoGet information on nearby facilities
includePhotoNoGet scenery photos of current location

Implementation Reference

  • Tool definition and registration in makeToolsDef: conditionally names the tool 'get_traveler_view_info' (non-second person mode), defines input schema for optional booleans includePhoto and includeNearbyFacilities, title, description. Included in tools list returned by ListToolsRequestSchema handler.
    {
      name: env.personMode === 'second' ? "get_current_view_info" : "get_traveler_view_info",
      title: "Get the current location's view",
      description: env.personMode === 'second' ?
        "Get the address of the current location and information on nearby facilities,view snapshot" :
        "Get the address of the current traveler's location and information on nearby facilities,view snapshot",
      inputSchema: {
        type: "object",
        properties: {
          includePhoto: {
            type: "boolean",
            description: "Get scenery photos of current location"
          },
          includeNearbyFacilities: {
            type: "boolean",
            description: "Get information on nearby facilities"
          },
        }
      }
    },
  • Dispatch handler in toolSwitch function (invoked by MCP CallToolRequestSchema): matches tool name and calls getCurrentLocationInfo with parsed arguments.
    case "get_traveler_view_info":
      return getCurrentLocationInfo(request.params.arguments?.includePhoto as boolean, request.params.arguments?.includeNearbyFacilities as boolean,env)
    case "reach_a_percentage_of_destination":
  • Thin wrapper helper: invokes RunnerService.getCurrentView with current time and parameters, handling practice mode.
    const getCurrentLocationInfo = (includePhoto: boolean, includeNearbyFacilities: boolean,env:Mode) => {
      return RunnerService.getCurrentView(dayjs(), includePhoto, includeNearbyFacilities, env.isPractice)
    }
  • Primary handler implementation: Retrieves current run status, computes elapsed ratio, updates if ended, delegates to makeView for status-specific view generation.
    function getCurrentView(now: dayjs.Dayjs, includePhoto: boolean, includeNearbyFacilities: boolean, practice = false) {
      return Effect.gen(function* () {
        const {runStatus, justArrive, elapseRatio} = yield* getRunStatusAndUpdateEnd(now,practice);
        //  ただし前回旅が存在し、それが終了していても、そのendTimeから1時間以内ならその場所にいるものとして表示する
        return yield* makeView(runStatus, elapseRatio, justArrive && dayjs().isBefore(dayjs.unix(runStatus.tilEndEpoch).add(1, "hour")), includePhoto, includeNearbyFacilities, practice)
      })
    }
  • Generates view based on trip status: 'vehicle' (special prompts/images), 'stop' (hotel image), 'running' (facilities, street/AI image, location text); formats ToolContentResponse with text/image.
    function makeView(runStatus: RunStatus, elapseRatio: number, showRunning: boolean, includePhoto: boolean, includeNearbyFacilities: boolean, practice = false, debugRoute?: string) {
      return Effect.gen(function* () {
        let loc: LocationDetail
        let viewStatus: TripStatus;
        const runnerEnv = yield* DbService.getSysEnv()
        // const env = yield *DbService.getSysMode()
        if (practice) {
          loc = {
            status: runStatus.status,
            lat: runStatus.endLat,
            lng: runStatus.endLng,
            bearing: MapService.getBearing(runStatus.startLat, runStatus.startLng, runStatus.endLat, runStatus.endLng),
            timeZoneId: 'Asia/Tokyo',
            remainSecInPath: 0,
            maneuver: undefined,
            isEnd: true,
            landPathNo: -1,
          }
          viewStatus = runStatus.status;
        } else {
          loc = yield* calcCurrentLoc(runStatus, elapseRatio, debugRoute); //  これは計算位置情報
          viewStatus = loc.status;
          yield* McpLogService.logTrace(`getCurrentView:elapseRatio:${elapseRatio},start:${runStatus.startTime},end:${dayjs.unix(runStatus.tilEndEpoch)},status:${loc.status}`)
          if (showRunning) {
            viewStatus = 'running'
          }
          //  skip移動モードのときは例外的に画像情報はrunningにする(stop=ホテル画面ではなく、今の場所の画面を生成する)
          if (runnerEnv.mode.moveMode === "skip" && viewStatus === "stop") {
            viewStatus = 'running'
          }
        }
        switch (viewStatus) {
          case 'vehicle':
            return yield* vehicleView(loc, includePhoto,runnerEnv);
          case 'stop':
            return yield* hotelView(practice ? 'Asia/Tokyo' : loc.timeZoneId, includePhoto, runStatus.to, runnerEnv)
          case "running":
            const {
              nearFacilities,
              image,
              locText
            } = yield* (practice ? getFacilitiesPractice(runStatus.to, includePhoto) : getFacilities(loc, runnerEnv, includePhoto, false))
            return yield* runningReport(locText, includeNearbyFacilities ? nearFacilities : undefined, image, false, showRunning).pipe(Effect.andThen(a => a.out))
        }
    
      }).pipe(Effect.catchAll(e => {
        if (e instanceof AnswerError) {
          return Effect.fail(e)
        }
        return McpLogService.logError(`getCurrentView catch:${e},${JSON.stringify(e)}`).pipe(Effect.andThen(() =>
          Effect.fail(new AnswerError("Sorry,I don't know where you are right now. Please wait a moment and ask again."))));
      }))
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes what information is retrieved but lacks details on permissions, rate limits, data freshness, or error handling. For a tool that accesses location and facility data, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, stating the core purpose in a single sentence. However, the phrase 'view snapshot' is ambiguous and could be clarified, slightly reducing efficiency. Overall, it's appropriately sized with minimal waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (retrieving location and facility data), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavioral aspects and output format, which are important for effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with clear descriptions for both parameters ('includeNearbyFacilities' and 'includePhoto'). The description mentions 'information on nearby facilities' and 'view snapshot', which align with the parameters but don't add significant meaning beyond what the schema provides. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the address of the current traveler's location and information on nearby facilities, view snapshot'. This specifies the verb ('Get') and resources (address, nearby facilities, view snapshot). However, it doesn't explicitly distinguish this tool from sibling tools like 'get_traveler_location' or 'get_traveler_info', which appear related to traveler data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or clarify the context for selecting this specific tool over others like 'get_traveler_location' or 'get_traveler_info', leaving usage ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mfukushim/map-traveler-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server