getSystemInfo
Retrieve system information from Directus by querying endpoints such as health, info, or activity. Use authentication tokens and API URLs to access data seamlessly.
Instructions
Get system information from Directus
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | Yes | System endpoint (e.g. 'health', 'info', 'activity') | |
| token | No | Authentication token (default from config) | |
| url | No | Directus API URL (default from config) |
Input Schema (JSON Schema)
{
"properties": {
"endpoint": {
"description": "System endpoint (e.g. 'health', 'info', 'activity')",
"type": "string"
},
"token": {
"description": "Authentication token (default from config)",
"type": "string"
},
"url": {
"description": "Directus API URL (default from config)",
"type": "string"
}
},
"required": [
"endpoint"
],
"type": "object"
}
Implementation Reference
- index.ts:693-710 (handler)Handler implementation for the getSystemInfo tool. It fetches data from Directus /server/{endpoint} endpoint using axios GET request with authentication token and returns the JSON response.case "getSystemInfo": { const token = toolArgs.token || CONFIG.DIRECTUS_ACCESS_TOKEN; const endpoint = toolArgs.endpoint as string; const response = await axios.get( `${url}/server/${endpoint}`, { headers: buildHeaders(token) } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2) } ] }; }
- index.ts:226-247 (registration)Tool registration in the ListTools response, defining name, description, and input schema for getSystemInfo.{ name: "getSystemInfo", description: "Get system information from Directus", inputSchema: { type: "object", properties: { url: { type: "string", description: "Directus API URL (default from config)" }, token: { type: "string", description: "Authentication token (default from config)" }, endpoint: { type: "string", description: "System endpoint (e.g. 'health', 'info', 'activity')" } }, required: ["endpoint"] } },
- index.ts:229-246 (schema)Input schema definition for the getSystemInfo tool, specifying parameters like url, token, and required endpoint.inputSchema: { type: "object", properties: { url: { type: "string", description: "Directus API URL (default from config)" }, token: { type: "string", description: "Authentication token (default from config)" }, endpoint: { type: "string", description: "System endpoint (e.g. 'health', 'info', 'activity')" } }, required: ["endpoint"] }