Skip to main content
Glama
Rodriguespn

Logflare MCP Code Mode

by Rodriguespn

Search the Logflare API spec

search
Read-onlyIdempotent

Search the Logflare API specification by executing JavaScript code in a sandbox to discover endpoints, parameters, and request bodies.

Instructions

Search the Logflare Management API's OpenAPI spec by writing JavaScript. Runs in a network-isolated sandbox.

Your code is an async arrow function that returns a value; it receives spec (all $refs resolved inline):

interface OperationInfo { summary?: string; description?: string; deprecated?: boolean; tags?: string[]; parameters?: Array<{ name: string; in: string; required?: boolean; schema?: unknown; description?: string }>; requestBody?: { required?: boolean; content?: Record<string, { schema?: unknown }> }; responses?: Record<string, { description?: string; content?: Record<string, { schema?: unknown }> }>; } declare const spec: { paths: Record<string, Record<string, OperationInfo>> };

Use this to find endpoints and their parameters/request bodies before calling execute_read/execute_write. Output over 100k chars is truncated — return small slices.

Example — find endpoints for sources (grouped by path): async () => Object.entries(spec.paths) .filter(([path]) => path.includes('/sources')) .map(([path, ops]) => ({ path, methods: Object.keys(ops) }))

Example — inspect one operation's request body and parameters: async () => spec.paths['/api/sources']?.post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesAsync arrow function receiving `spec`; must return a value.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds valuable behavioral context: code runs in a network-isolated sandbox, output over 100k chars is truncated, and the function is async returning a value. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: concise first line, then detailed interface, usage note, and examples. Every sentence adds value. It is appropriately sized for the complexity of the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers all necessary aspects: sandbox, input specification, output truncation, and usage context. No output schema exists, but the description implicitly informs about return values. Complete for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema describes one parameter 'code' with a basic description. The description significantly enhances meaning by providing the full TypeScript interface for `spec`, examples, and execution constraints. This far exceeds the schema coverage (100% baseline).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search the Logflare Management API's OpenAPI spec by writing JavaScript.' It specifies the verb (search) and the resource (API spec), effectively distinguishing it from sibling tools like execute_read and execute_write.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use the tool: 'Use this to find endpoints and their parameters/request bodies before calling execute_read/execute_write.' It provides a clear context and examples, guiding the agent on appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rodriguespn/logflare-mcp-code-mode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server