Returning URLs & Links
Returning URLs & Links
Returning URLs & Links
When your plugin needs to return URLs or hyperlinks, it’s critical to do so in a structured, consistent, and safe manner. Correctly formatted links improve reliability, readability, and ensure the reasoning engine interprets them correctly.
This document outlines the best practices for returning URLs and hyperlinks from your plugin responses.
Ideally, URLs should be returned as a string value within a structured payload under a url key. Avoid embedding them inside free-form, mixed-format text that combines instructions and URLs.
For example, when returning a URL such as https://docs.moveworks.com, you can choose one of two presentation styles:


Both are valid, depending on how you want the client or reasoning engine to interpret the response.
Follow these rules whenever possible:
%20 — this is the most critical.()[] if used outside reserved contexts, especially ().Why this matters:
Characters like ?, (), and [] have reserved meanings in URLs or in Markdown syntax. Failing to encode them can break the link or cause rendering or hallucination issues in LLM contexts.
When building URLs dynamically and deterministically in your plugin, use DSL or Bender/Data Mapper utilities like $CONCAT() or RENDER() to define them as part of your payload. This makes them easier for the reasoning engine to interpret and reduces hallucination risk as opposed to trying to use free form text and have the llm figure it out.
Example using $CONCAT()
If you have:
https://us2.itsm.comdata.result.ticket_idYou can define:
This creates a properly structured ticket_url key that represents the final link.
Example using RENDER()
Both approaches ensure the URL is generated consistently and readable by downstream systems.
When returning **hyperlinks ** in a plugin response, use a consistent, machine-readable format. Proper hyperlink formatting ensures that links are rendered correctly across clients (e.g., chat interfaces, documentation, or dashboards) and parsed reliably by the reasoning engine.
✅ Preferred — Markdown is portable, readable, and supported in most rendering contexts.
<URL|text> syntax only when using Slack as you only chat interface.⚠️ Acceptable, but not preferred — This format is platform-specific.
The following formats should not be used in plugin responses:
<https://example.com> — plain angle-bracketed URL<a href="https://example.com">link</a> — raw HTML anchor tags[Click here|https://example.com] — invalid Markdown syntax