get_datasource_by_uid
Retrieve detailed information about a specific Grafana datasource using its unique identifier (UID) to streamline data access and management.
Instructions
Retrieves detailed information about a specific datasource using its UID.
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": {
"uid": "<uid>"
},
"name": "get_datasource_by_uid"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | The uid of the datasource |
Implementation Reference
- GrafanaClient helper method that performs the actual API request to Grafana to fetch datasource by UID.
async getDatasourceByUid(uid: string): Promise<Datasource> { try { const response = await this.client.get(`/api/datasources/uid/${uid}`); return response.data; } catch (error) { this.handleError(error); } }