Skip to main content
Glama
mabeldata

PocketBase MCP Server

by mabeldata

get_log

Retrieve a specific API request log by its unique ID to analyze request details and troubleshoot issues effectively using the PocketBase MCP Server.

Instructions

Get a single API request log by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the log to fetch.

Implementation Reference

  • The handler function that implements the get_log tool logic: validates id, fetches the log using pb.logs.getOne(id), and returns JSON stringified result.
    async function getLog(args: GetLogArgs, pb: PocketBase): Promise<ToolResult> {
        if (!args.id) {
            throw invalidParamsError("Missing required argument: id");
        }
        
        // Make the API request to get a single log
        const result = await pb.logs.getOne(args.id)
        
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • Type definition for input arguments of get_log tool.
    export interface GetLogArgs {
      id: string;
    }
  • Tool registration info including name, description, and input schema for get_log.
    {
        name: 'get_log',
        description: 'Get a single API request log by ID.',
        inputSchema: {
            type: 'object',
            properties: {
                id: { type: 'string', description: 'The ID of the log to fetch.' },
            },
            required: ['id'],
        },
    },
  • Dispatch/registration routing for get_log tool to the log tools handler.
    } else if (name === 'list_logs' || name === 'get_log' || name === 'get_logs_stats') {
        return handleLogToolCall(name, toolArgs, pb);
  • Helper switch case in handleLogToolCall that routes get_log to the getLog handler.
    case 'get_log':
        return getLog(args as GetLogArgs, pb);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool fetches a log but doesn't describe what happens if the ID is invalid (e.g., error handling), whether authentication is required, or the format of the returned log. This leaves significant gaps in understanding the tool's behavior beyond the basic action.

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 a single, direct sentence that efficiently conveys the core action without unnecessary words. It is front-loaded with the essential information ('Get a single API request log by ID'), making it highly concise and well-structured for quick comprehension.

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

Completeness2/5

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

Given the complexity of a read operation with no annotations and no output schema, the description is incomplete. It doesn't explain what the returned log contains, potential errors, or dependencies, leaving the agent with insufficient context to use the tool effectively beyond the basic parameter requirement.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'id' parameter clearly documented as 'The ID of the log to fetch.' The description adds no additional semantic context beyond what the schema provides, such as ID format examples or constraints. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Get') and resource ('a single API request log by ID'), making the purpose understandable. It doesn't explicitly distinguish from sibling tools like 'list_logs' or 'get_logs_stats', but the specificity of retrieving a single log by ID provides some implicit differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_logs' for multiple logs or 'get_logs_stats' for aggregated data, nor does it specify prerequisites such as needing a valid log ID. Usage context is implied but not explicitly stated.

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

Related 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/mabeldata/pocketbase-mcp'

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