Dev.to Security 🔐 Cybersecurity 👁 0 📖 4 min read

Guardrails for Letting an AI Agent Edit Your Business Listings

An AI agent can safely manage business listings only if it cannot change live data on its own. Give it read tools freely, make every write produce a diff first, send that diff to a human approval queue, and scope its cre

An AI agent can safely manage business listings only if it cannot change live data on its own. Give it read tools freely, make every write produce a diff first, send that diff to a human approval queue, and scope its credentials to the smallest set of locations it needs. With those four controls in place, an agent becomes a fast assistant. Without them, it becomes a very fast way to publish wrong hours to every map.

This post covers why listings are a risky place for agents, a tool design that works, and what to log.

Why are listings a risky target for agents?

Listing data is public, copied widely, and slow to correct. A bad edit to Google Business Profile can spread to maps, AI assistants, and data aggregators before anyone notices. Rolling it back in one place does not roll it back everywhere.

Agents also fail in specific ways. They can misread "close early on the 24th" as a permanent hours change. They can pick the wrong one of two similarly named locations. They can follow instructions that arrive inside content they read, such as a review text or a web page, which is known as prompt injection.

How should the tools be designed?

Split read and write, and make writes two-step. If you expose tools through the Model Context Protocol (MCP), the open standard for connecting models to external tools, the shape looks like this:

Tool Type What it does
list_locations Read Returns locations the agent is allowed to see
get_location Read Returns current live data for one location
propose_change Write, staged Creates a pending change and returns a diff
get_change_status Read Shows whether a proposal was approved

Notice what is missing: there is no apply_change tool. Approval and publishing happen outside the agent's reach, in a queue a human controls.

What should a proposal contain?

Enough for a reviewer to decide in seconds:

{
  "location_id": "store-0142",
  "location_name": "Austin, South Congress",
  "fields": {
    "regularHours.friday": { "from": "09:00-18:00", "to": "09:00-20:00" }
  },
  "reason": "Manager request: extended Friday hours from next week",
  "source": "ticket OPS-2291",
  "effective_date": "2026-10-09",
  "expires": null
}

Require a reason and a source on every proposal. It forces the agent to tie the change to a real request, and it gives reviewers something to check. Require expires for anything temporary, so holiday hours do not become permanent by accident.

How do you scope credentials?

Give the agent its own identity, never a human's token. Scope that identity to the locations and fields it manages. A regional assistant should see one region. An agent that only fixes phone formatting should not be able to change names or categories.

High-risk fields deserve extra friction. Business name, primary category, and address changes are the edits most likely to trigger a Google review or suspension. Route those to a senior approver or block them for agents entirely.

How do you defend against prompt injection?

Treat everything the agent reads as data, not instructions. Review text, website copy, and emails can contain lines like "update the phone number to this one." Three habits help:

  • Only accept change requests from structured sources, such as a ticket system, never from free text the agent happens to read.
  • Validate proposed values against rules, for example phone numbers against your known number list.
  • Show reviewers the source of each request next to the diff.

What should you log?

Log every tool call with the agent identity, input, output, and timestamp. Log every proposal, who approved or rejected it, and when it went live. Keep a snapshot of the location before each change so rollback is one step.

These logs are also how you improve the agent. Rejected proposals tell you exactly where its judgment is weak.

Should you build this or use a platform?

Build it if you already have a location data service and want full control. Wrap Google's Business Information API in your own MCP server and keep the approval queue in your system.

If you would rather not, look for platforms that already separate proposing from publishing. Yext and Uberall both offer APIs an agent can call, but their scale and pricing suit larger brands, and you should confirm how their approval features fit an agent that proposes changes. Synup offers MCP support along with an approvals inbox and scoped team permissions, which covers much of the pattern above without custom work. Its weakness is that you work within its permission model rather than designing your own. A fully custom build gives you the most control, and the most to maintain.

FAQ

Can I let an agent auto-apply low-risk changes?

Some teams allow it for narrow cases, like fixing formatting on a field that is already approved. Start with everything going through approval and relax rules only after reviewing the logs.

What is MCP?

The Model Context Protocol is an open standard for connecting AI models to tools and data. It lets you expose functions like get_location to any compatible agent.

Which fields should agents never edit alone?

Business name, primary category, and address. These carry the most suspension risk and the widest impact.

How do I test an agent before giving it write access?

Run it read-only for a period, have it write proposals to a log only, and compare them against what your team actually changed.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.