tellagen_build_source_link
Turn an evidence source into a clickable Grafana or GitHub link, or a kubectl command when no browser URL exists, ready to paste into evidence_refs[].links[].
Instructions
Build the clickable link (or copyable command) for an evidence source, to put in evidence_refs[].links[]. Grafana Explore, panel and trace links come from the Grafana address that Tellagen sent when you picked the run up, else GRAFANA_URL in the MCP environment, else the Tellagen Grafana datasource; GitHub compare, commit, pull request, Actions run (ci_run) and release links come from repo and the GitHub address Tellagen sent. Kubernetes and other sources without a browser URL return a command or guidance instead. Calls only the Tellagen API, puts no credentials in a URL, and returns {links:[{kind,label,url}]} that you copy into the ref unchanged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kind": "<kind>"
},
"name": "tellagen_build_source_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Range end, same formats as from | |
| sha | No | Commit sha (commit) | |
| tag | No | Release tag (release) | |
| base | No | Base ref or sha (diff) | |
| from | No | Range start: an ISO instant, epoch milliseconds or a relative time like now-6h. Defaults to the start of the run window (the incident window for a run with no window) when a run is active or investigation_run_id is given, otherwise now-1h. Stay inside the window when you look for the cause | |
| head | No | Head ref or sha (diff) | |
| kind | Yes | explore = Grafana Explore for a Prometheus query; logs = Grafana Explore for a Loki query; trace = Grafana Explore for a Tempo trace id; panel = a Grafana dashboard panel; diff = GitHub compare; commit = GitHub commit; pr = GitHub pull request; ci_run = a GitHub Actions run or job; release = a GitHub release. ci_run and release links need diagnosis_changes_v1 on the run. | |
| repo | No | GitHub repository as owner/name | |
| query | No | The PromQL / LogQL query for explore and logs, or the trace id for trace | |
| job_id | No | GitHub Actions job id, to open the failing job of the run (ci_run) | |
| org_id | No | Grafana org id; left out of the link when not given | |
| run_id | No | GitHub Actions run id, as in /actions/runs/<id> (ci_run) | |
| source | No | The evidence source name you use in the ref (for example "kubernetes-logs"). Kubernetes and other sources without a browser URL return a command or guidance instead of a link. | |
| k8s_url | No | A k8s://context/<ctx>/namespace/<ns>/<kind>/<name> reference to turn into a kubectl command (source: kubernetes) | |
| panel_id | No | Grafana panel id (panel) | |
| connector | No | Name of the Tellagen Grafana datasource when several are configured | |
| pr_number | No | Pull request number (pr) | |
| datasource | No | Grafana data source uid (or name) the query ran against; Explore opens that data source | |
| github_url | No | GitHub Enterprise base address; defaults to the GitHub address Tellagen sent with the pickup, else https://github.com | |
| dashboard_uid | No | Grafana dashboard uid (panel) | |
| investigation_run_id | No | Run whose window is the default time range (read from its pickup or context). Defaults to the run this session picked up |