Skip to content

Serve controlled data without opening the cupboard

Read-only does not mean safe-to-share

Data Tools do not intentionally change another system. They return information to the model, which may use it in a visitor response. The central question is therefore not “Can this write?” but “Is every returned field approved for public disclosure?”

Two read-only Tools, two very different risk profiles

Section titled “Two read-only Tools, two very different risk profiles”
Choose the data source deliberately
TypeReturnsBest usePrimary risk
Static Data The JSON object or list created in the Tool editor. Small controlled facts such as public contact points, opening hours, or a short service directory. Sample or stale values remain live because no external source updates them.
WP Option The complete value returned by WordPress get_option() for one exact option key. A small, deliberately designed, nonsecret option whose entire value is suitable for visitors. Many plugin options contain credentials, internal URLs, emails, configuration, or large serialized structures. There is no field-level allowlist.

Static Data is the safer default because you decide the public shape. WP Option is convenient only when the option itself was designed as public data. Do not use WP Option as a shortcut to avoid copying three approved fields from a much larger private settings array.

Build Static Data that is easy to maintain

Section titled “Build Static Data that is easy to maintain”

The visual builder can add fields, groups, and lists. Raw JSON is useful when you already understand the structure. The two views represent the same data; invalid raw JSON blocks a clean save in the interface. Keep structures shallow enough that an administrator can review them without a developer.

For multiple locations, prefer a predictable list of records:

{
"locations": [
{
"name": "Central Office",
"phone": "+385 1 555 0100",
"hours": "Monday–Friday, 09:00–17:00"
},
{
"name": "West Office",
"phone": "+385 1 555 0101",
"hours": "Tuesday–Saturday, 10:00–18:00"
}
]
}

Use explicit units, time zones, currencies, and market labels. “Open 9–5” leaves day, time zone, and exception rules unresolved. Do not mix internal notes into the same object because “the model probably will not mention them.” If returned, they are available as model context.

Controls specific to Static Data
ControlPurposeMaintenance rule
Visual builder Creates named fields, nested groups, and lists without hand-writing JSON. Use clear public labels and review the resulting structure after moving between modes.
Add field Adds one named value. Store one concept per field; include unit or context in the value when needed.
Add group Nests related named values. Use for one cohesive record such as a location, not to recreate an entire database.
Add list Stores repeated items. Keep item shapes consistent so the model does not infer missing fields.
Raw JSON Lets an experienced editor paste or edit the complete data value. Validate commas, quotes, braces, arrays, and data types; never paste an unreviewed production export.
Test result Shows the full object returned to runtime. Read every field as though it may appear in chat.

WP Option: open the box before you expose it

Section titled “WP Option: open the box before you expose it”

A WordPress option is a named database value used by WordPress, a theme, or a plugin. The Tool calls get_option() with the configured key and returns that entire value. It does not select a nested field, redact secrets, or know which keys are “internal.” Serialized data is made available as the stored value WordPress returns.

Options frequently bundle public configuration beside API tokens, administrator emails, webhook URLs, private IDs, or feature flags. Never guess from the option name. Ask a developer or site owner to inspect the current value, understand how it may change after updates, and approve every field.

If only two nested values are safe, create Static Data containing those values or ask a developer for a dedicated filtered integration. The built-in WP Option Tool does not provide a field picker.

  1. Define the public question. Write which visitor request this Tool answers better than the Knowledge Base.
  2. Choose the smallest source. Prefer Static Data unless an entire reviewed option is purpose-built for disclosure.
  3. Shape for understanding. Use descriptive keys, units, markets, and consistent records.
  4. Write a narrow AI Description. Distinguish this exact data from broader website questions that should use knowledge search.
  5. Assign it narrowly. Expose it only to the Assistant that needs it.
  6. Keep it disabled. Review and test before runtime exposure.
  7. Test the complete return. Search it for tokens, private URLs, personal data, internal notes, and irrelevant settings.
  8. Ask end-to-end questions. Include one intended request and several adjacent questions that should not call the Tool.
  9. Set an owner and review trigger. Static Data needs manual updates; an option can change after plugin settings or upgrades.

Use Static Data for a compact record where structure matters: branch name, public phone, service hours. Use the Knowledge Base for explanation, conditions, narrative, and source citations: holiday exceptions, appointment policy, detailed accessibility information. A good design can use both: Static Data returns today’s structured branch list while the Knowledge Base explains how to arrange accessibility support.

Do not store a long policy as one Static Data string merely to force retrieval. That removes normal content ownership and sync visibility while giving no useful structure.

What the model can do with a returned object

Section titled “What the model can do with a returned object”

The Tool result becomes context for the response. The model may summarize it, select one matching record, translate labels, or explain that no matching value was returned. It is not a templating engine that guarantees every JSON key appears verbatim. If exact formatting or a regulated statement must be preserved, design the Tool result and Assistant instructions carefully and test the final chat—not only the admin JSON panel.

A broad object also spends more response context and gives the model more opportunities to select the wrong field. Return the smallest coherent object for the Tool’s stated purpose. If visitors need several unrelated datasets, separate them into distinctly described Tools rather than one get_all_business_data function.

Static Data does not become Pending when the real world changes. WordPress cannot know that summer opening hours ended or a branch telephone number moved. Record a content owner, review interval, source of truth, and event that triggers an immediate update. Put a meaningful date or scope inside the returned data when visitors need it, but do not expose internal review notes.

WP Option changes automatically when its owning WordPress feature saves that option, which sounds easier but introduces a different maintenance risk: a plugin update can add new nested fields, including sensitive ones, without changing the Tool. Reinspect the full option after relevant plugin/theme updates and configuration changes. If its shape is not governed for public use, retire the WP Option Tool.

Ask questions that should not call the data Tool: a broad policy question, a request for a private staff number, a location not in the dataset, and a demand to reveal all configuration. The Assistant should use knowledge, state the limitation, or decline appropriately. A Tool is well scoped when its absence is as predictable as its use.

What a strange return usually means
ObservationExplanationAction
Static Data will not save Raw mode contains invalid JSON or the visual structure is incomplete. Correct quotes, commas, brackets, object keys, and value types.
WP Option result is empty The exact key is wrong, absent on this site, or legitimately stores an empty value. Verify the key and environment with a developer; do not try nearby keys in production chat.
Tool exposes too much The full configured object/option is returned. Disable immediately. Replace it with a smaller Static Data object or dedicated filtered integration.
Answer uses old hours Static Data is a manual snapshot. Correct the Tool, test, and create an editorial review schedule.
Tool is called for broad questions Its Description overlaps general knowledge intent. Narrow the Description and let file search handle website explanation.
Static and WordPress Data Tools
Capture
Show a Static Data tool with fictional public contact JSON in the visual builder and Enabled off.
Show
Tool type, JSON builder/raw toggle, safe sample fields, test action, Enabled
Viewport
Desktop, 1440 × 900
Annotate
Use numbered callouts only for controls referenced in the procedure.
Redact
OpenAI keys, tokens, secrets, personal information, private URLs, IP addresses, and conversation text