Why AI needs location grounding
Mohini Todkari — 22 September 2026
8 min read
28 September 2026

When I review older HERE sample applications, some may use an older version of the HERE Maps API for JavaScript, even though 3.2 has been out for quite a while. Maybe nobody has touched the code since it was written. Maybe a coding assistant generated it from training data that predates 3.2. From the code alone, you can't always tell.
Either way, a lot of us have apps like this: demos, proofs of concept, conference sessions, internal tools. They still run and people still use them, but they've fallen behind current frameworks, dependencies, and recommended practices. None of the updates are especially hard. The challenge is in finding time to maintain them.
AI coding assistants can help clear that backlog, but only if they're working from current information. Otherwise they risk repeating the same outdated patterns you're trying to remove.
In this article, I'll walk through how AWS Kiro can help modernize an older HERE app. It pairs AI-assisted refactoring with a Model Context Protocol (MCP) server built on HERE's documentation, so its suggestions come from today's docs instead of outdated training data.
Outdated dependencies are usually the easy part of an old app. The harder part is the implementation patterns that made sense when the code was written but no longer match HERE's current recommendations.
Those patterns are easy to miss when you're upgrading by hand, and easier still when an AI coding assistant does the work. Think back to the 3.1 code I mentioned earlier. An assistant without current docs has no reason to flag it and may keep writing code the same way.
Moving from 3.1 to 3.2 shows why. You can't just bump the version number in your imports and move on. Version 3.2 changed how rendering works: older rendering approaches were removed, and the engine model was simplified. In practice, a migration usually means:
Updating library references
Reviewing how rendering is configured
Replacing deprecated functionality
Bringing the code in line with HERE's current guidance
That's where a coding assistant connected to current documentation earns its keep. It has to know what changed in 3.2, and most of that lives in the docs.
A coding assistant is only as reliable as the information it can access.
Without current documentation, an assistant relies primarily on its training data. Depending on when that data was collected, recommendations may reference deprecated methods, outdated examples or older implementation practices.
Connecting a documentation-based MCP server changes that process.
Instead of relying solely on previously learned information, AWS Kiro can then query current documentation via MCP while reviewing and refactoring code.
This provides access to:
Current API documentation
Updated method signatures
Recommended implementation patterns
Migration guidance
Product-specific best practices
For developers maintaining production applications, this reduces uncertainty and helps improve confidence in AI-generated suggestions.
There are several ways to configure MCP servers in AWS Kiro.
The fastest approach is to use the MCP configuration provided in the documentation and allow Kiro to update the configuration automatically.
Simply paste the MCP server configuration into the chat and instruct Kiro to add it to the MCP settings.
JSON{"servers": {"here-docs": {"url": "https://docs.here.com/mcp","type": "http"}

For developers who prefer a manual approach:
Open the MCP panel in AWS Kiro
Create a new MCP server entry
Add the HERE documentation MCP configuration
Save the configuration
Restart the connection if required
Regardless of the approach, verifying the connection status is essential before beginning any refactoring effort.
A disconnected MCP server can create a misleading experience.
Before starting any modernization project, confirm that:
The MCP server is connected
Documentation queries succeed
Current HERE documentation can be retrieved

A quick validation step can prevent significant rework later.
With the MCP server connected and validated, the next step is selecting a codebase for review.
For this example, I used an older HERE sample application.
The goal was not to redesign the application. The objective was to identify opportunities to:
Upgrade HERE Maps API for JavaScript implementations
Modernize coding patterns
Remove deprecated functionality
Improve maintainability
Align with current HERE recommendations
Even simple single-page applications can benefit from these improvements.
Before making changes, I typically ask Kiro to act as a code reviewer.
Starting with a review helps identify improvement opportunities before generating new code.
Example prompt:
textAct as an experienced HERE platform code reviewer.Analyze the current {application name} application and identify opportunities to:1. Upgrade the implementation to the latest HERE Maps API for JavaScript version2. Replace deprecated patterns and functions3. Follow current HERE documentation and recommended practices4. Improve code readability and maintainability5. Refactor duplicated or unnecessary logic6. Suggest performance improvements where applicable7. Keep the application functionality unchanged unless a better approach is recommendedProvide:1. A summary of findings2. Prioritized improvements3. Code examples4. Migration guidance5. Refactored implementations
This review-first approach provides a clear understanding of the modernization path before code changes begin.

The most important lesson from this process is simple.
AI coding assistants are highly effective at modernization and refactoring tasks when they have access to accurate and current information.
Without grounding, recommendations may reflect older documentation or outdated examples. With access to current documentation through a Model Context Protocol server, AWS Kiro can generate suggestions that better align with the latest HERE platform guidance.

The difference is significant.
Rather than asking:
How do I upgrade this application?
The process becomes:
How do I upgrade this application using the latest HERE documentation and recommendations?
That additional context can dramatically improve the quality of generated results.
Not every older HERE application needs a rewrite. Someone needs to go through them, find what's out of date, and fix it, and that's a job that can keep getting pushed to next week.
With access to current documentation and a structured review process, AWS Kiro can help identify outdated patterns, recommend improvements, and accelerate migration work.
For teams managing multiple repositories, developer samples or long-lived applications, this approach can reduce the effort required to keep projects aligned with current HERE platform capabilities.
If you look after a few samples, demos, or internal tools, pick one and try it. Point Kiro at the code, run the review prompt from this article, and see what comes back. The move to 3.2 might be smaller than you expected, or it might be more overdue than you thought. Either way, you'll have a list to work from instead of a vague sense that the code is old.
Explore the HERE Maps API for JavaScript documentation, connect the HERE documentation Model Context Protocol server to AWS Kiro and run a review against one of your existing applications. The results may reveal modernization opportunities that are easy to implement and valuable to maintain.

Alberts Jekabsons
Sr. Developer Evangelist
Share article
Why sign up:
Latest offers and discounts
Tailored content delivered weekly
Exclusive events
One click to unsubscribe