List Logflare sources
list_sourcesList log streams accessible to your API key. View all configured log sources for monitoring.
Instructions
List all sources (log streams) accessible to the configured API key.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_sources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:40-54 (registration)Registration of the 'list_sources' tool on the MCP server with schema and handler.
server.registerTool( 'list_sources', { title: 'List Logflare sources', description: 'List all sources (log streams) accessible to the configured API key.', inputSchema: {}, }, async () => { try { return text(await client.listSources()) } catch (err) { return errorText(err) } }, ) - src/index.ts:42-45 (schema)Schema definition for list_sources: title, description, and empty input schema (no parameters).
{ title: 'List Logflare sources', description: 'List all sources (log streams) accessible to the configured API key.', inputSchema: {}, - src/index.ts:47-53 (handler)Handler function that calls client.listSources() and formats the response.
async () => { try { return text(await client.listSources()) } catch (err) { return errorText(err) } }, - src/logflare.ts:78-80 (helper)Helper method on LogflareClient that performs the HTTP GET request to /api/sources.
listSources() { return this.request<{ data: unknown[] }>('/api/sources') }