Skip to main content
Glama
mabeldata

PocketBase MCP Server

by mabeldata

get_log

Retrieve a specific API request log from PocketBase by providing its unique ID.

Instructions

Get a single API request log by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the log to fetch.

Implementation Reference

  • The main handler function for the 'get_log' tool. It validates the 'id' argument, calls pb.logs.getOne(id) to fetch a single log from PocketBase, and returns the result as JSON text.
    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) }],
        };
    }
  • The TypeScript interface defining the input arguments for the 'get_log' tool: a required 'id' field of type string.
    export interface GetLogArgs {
      id: string;
    }
  • Registration of the 'get_log' tool with its name, description, and input schema (requiring 'id'). This is part of the logToolInfo array returned by listLogTools().
    {
        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'],
        },
    },
  • Routing logic in the main tool dispatcher: when the tool name is 'get_log', it delegates to handleLogToolCall().
    } else if (name === 'list_logs' || name === 'get_log' || name === 'get_logs_stats') {
        return handleLogToolCall(name, toolArgs, pb);
  • The switch case in handleLogToolCall() that routes 'get_log' to the getLog() function.
    case 'get_log':
        return getLog(args as GetLogArgs, pb);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. However, it only states the action without mentioning side effects, authentication needs, error handling, or what happens if the ID is invalid. The description adds minimal transparent behavior beyond the purpose.

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 sentence with no wasted words. It efficiently conveys the core purpose without superfluous information.

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

Completeness3/5

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

Given the tool's simplicity (one parameter, no output schema), the description is nearly complete. However, it lacks any information about return format or error behavior. Some context is missing, but the tool is straightforward enough that a 3 is reasonable.

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?

Schema coverage is 100%, with the parameter 'id' already described well. The description repeats 'by ID' but adds no extra semantics (e.g., format, source, or constraints). Baseline score of 3 is appropriate as the schema does the heavy lifting.

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 verb 'Get', the resource 'API request log', and the method 'by ID'. It effectively distinguishes the tool from siblings like 'list_logs' and 'get_logs_stats' by specifying that it retrieves a single log by its unique identifier.

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

Usage Guidelines4/5

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

The description implies when to use the tool: when you have a specific log ID and want that single log. It does not explicitly mention when not to use it or provide alternatives, but for a simple getter, this implicit guidance is clear enough.

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

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