Skip to main content
Glama

logging-list

Read-onlyIdempotent

Retrieve recent log entries from Simplifier with filtering by log level and time range. Access debug, info, warning, error, or critical logs using pagination and timestamp parameters.

Instructions

Get recent log entries from Simplifier

This tool provides access to the Simplifier logging system. You can filter logs by level and time range. If no filters are used, it returns the 50 most recent log entries. If you are expecting to find some logs but they are missing, ask the user to check whether logging for execution is set to the right level in the Simplifier server settings.

Log Levels:

  • 0 = Debug

  • 1 = Info

  • 2 = Warning

  • 3 = Error

  • 4 = Critical

Parameters:

  • pageSize: number of log entries to return in one request, defaults to 50.

  • page: if more than "pageSize" entries are available, this can be used for accessing later pages. Starts at 0, defaults to 0.

  • logLevel: Filter by minimum log level (0-4)

  • since: ISO timestamp for entries since this time

  • from/until: ISO timestamps for a time range (must be used together)

Examples:

  • Default: Get 50 most recent entries

  • logLevel=3: Only errors and critical

  • since="2025-01-01T00:00:00Z": Entries since date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageSizeNoNumber of log entries to return, defaults to 50
pageNoPage number for pagination, starts at 0
logLevelNoFilter by minimum log level (0=Debug, 1=Info, 2=Warning, 3=Error, 4=Critical)
sinceNoISO timestamp - get entries since this time
fromNoISO timestamp - start of time range (must be used with until)
untilNoISO timestamp - end of time range (must be used with from)

Implementation Reference

  • The handler function for the 'logging-list' tool. Processes pagination and filter parameters, fetches paginated log entries from SimplifierClient, maps them to resource objects using getLevelName helper, retrieves total pages, and returns a structured JSON response with logs list, pagination metadata, and applied filters.
    async ({ pageSize, page, logLevel, since, from, until }) => {
      return wrapToolResult('list log entries', async () => {
        const trackingKey = trackingToolPrefix + toolNameLoggingList
        const options: SimplifierLogListOptions = {};
        if (logLevel !== undefined) options.logLevel = logLevel;
        if (since) options.since = since;
        if (from && until) {
          options.from = from;
          options.until = until;
        }
    
        const response = await simplifier.listLogEntriesPaginated(page, pageSize, trackingKey, options);
        const pageCount = await simplifier.getLogPages(pageSize, options);
    
        const logEntryResources = response.list.map((entry: SimplifierLogEntry) => ({
          uri: `simplifier://logging/entry/${entry.id}`,
          id: entry.id,
          date: entry.entryDate,
          level: entry.level,
          levelName: getLevelName(entry.level),
          category: entry.category,
          messageKey: entry.messageKey,
          hasDetails: entry.hasDetails
        }));
    
        return {
          logs: logEntryResources,
          totalCount: response.list.length,
          page: page,
          pageSize: pageSize,
          totalPages: pageCount.pages,
          filters: {
            logLevel: options.logLevel,
            since: options.since,
            from: options.from,
            until: options.until
          }
        };
      });
    }
  • Input schema for the 'logging-list' tool defined using Zod validators for parameters: pageSize (default 50), page (default 0), logLevel (0-4), since, from, until with appropriate descriptions.
    {
      pageSize: z.number().optional().default(DEFAULT_PAGE_SIZE)
        .describe(`Number of log entries to return, defaults to ${DEFAULT_PAGE_SIZE}`),
      page: z.number().optional().default(0)
        .describe('Page number for pagination, starts at 0'),
      logLevel: z.number().min(0).max(4).optional()
        .describe('Filter by minimum log level (0=Debug, 1=Info, 2=Warning, 3=Error, 4=Critical)'),
      since: z.string().optional()
        .describe('ISO timestamp - get entries since this time'),
      from: z.string().optional()
        .describe('ISO timestamp - start of time range (must be used with until)'),
      until: z.string().optional()
        .describe('ISO timestamp - end of time range (must be used with from)')
    },
  • The registerLoggingTools function that registers the 'logging-list' tool on the MCP server, providing tool name, detailed markdown description, input schema, metadata hints, and the handler implementation.
    export function registerLoggingTools(server: McpServer, simplifier: SimplifierClient): void {
    
      const DEFAULT_PAGE_SIZE = 50;
    
      /* Note: this could be turned into a resource, if https://github.com/modelcontextprotocol/typescript-sdk/issues/149 is fixed */
      const toolNameLoggingList = "logging-list"
      server.tool(toolNameLoggingList,
        `# Get recent log entries from Simplifier
    
    This tool provides access to the Simplifier logging system. You can filter logs by level and time range.
    If no filters are used, it returns the ${DEFAULT_PAGE_SIZE} most recent log entries. If you are expecting to find some
    logs but they are missing, ask the user to check whether logging for execution is set to the right level in the Simplifier
    server settings.
    
    **Log Levels:**
    - 0 = Debug
    - 1 = Info
    - 2 = Warning
    - 3 = Error
    - 4 = Critical
    
    **Parameters:**
    - pageSize: number of log entries to return in one request, defaults to ${DEFAULT_PAGE_SIZE}.
    - page: if more than "pageSize" entries are available, this can be used for accessing later pages. Starts at 0, defaults to 0.
    - logLevel: Filter by minimum log level (0-4)
    - since: ISO timestamp for entries since this time
    - from/until: ISO timestamps for a time range (must be used together)
    
    **Examples:**
    - Default: Get 50 most recent entries
    - logLevel=3: Only errors and critical
    - since="2025-01-01T00:00:00Z": Entries since date
    `,
        {
          pageSize: z.number().optional().default(DEFAULT_PAGE_SIZE)
            .describe(`Number of log entries to return, defaults to ${DEFAULT_PAGE_SIZE}`),
          page: z.number().optional().default(0)
            .describe('Page number for pagination, starts at 0'),
          logLevel: z.number().min(0).max(4).optional()
            .describe('Filter by minimum log level (0=Debug, 1=Info, 2=Warning, 3=Error, 4=Critical)'),
          since: z.string().optional()
            .describe('ISO timestamp - get entries since this time'),
          from: z.string().optional()
            .describe('ISO timestamp - start of time range (must be used with until)'),
          until: z.string().optional()
            .describe('ISO timestamp - end of time range (must be used with from)')
        },
        {
          title: "List Simplifier Log Entries",
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: false
        },
        async ({ pageSize, page, logLevel, since, from, until }) => {
          return wrapToolResult('list log entries', async () => {
            const trackingKey = trackingToolPrefix + toolNameLoggingList
            const options: SimplifierLogListOptions = {};
            if (logLevel !== undefined) options.logLevel = logLevel;
            if (since) options.since = since;
            if (from && until) {
              options.from = from;
              options.until = until;
            }
    
            const response = await simplifier.listLogEntriesPaginated(page, pageSize, trackingKey, options);
            const pageCount = await simplifier.getLogPages(pageSize, options);
    
            const logEntryResources = response.list.map((entry: SimplifierLogEntry) => ({
              uri: `simplifier://logging/entry/${entry.id}`,
              id: entry.id,
              date: entry.entryDate,
              level: entry.level,
              levelName: getLevelName(entry.level),
              category: entry.category,
              messageKey: entry.messageKey,
              hasDetails: entry.hasDetails
            }));
    
            return {
              logs: logEntryResources,
              totalCount: response.list.length,
              page: page,
              pageSize: pageSize,
              totalPages: pageCount.pages,
              filters: {
                logLevel: options.logLevel,
                since: options.since,
                from: options.from,
                until: options.until
              }
            };
          });
        }
      );
    }
  • Top-level tool registration in registerTools function, including the call to registerLoggingTools(server, simplifier) which sets up the logging-list tool among others.
      registerServerBusinessObjectTools(server, simplifier)
      registerServerDatatypeTools(server, simplifier)
      registerConnectorTools(server, simplifier)
      registerLoginMethodTools(server, simplifier)
      registerLoggingTools(server, simplifier)
      registerSapSystemTools(server, simplifier)
    }
  • Utility helper function getLevelName that maps numeric log levels (0-4) to string names used in both log entry resources and handler output.
    function getLevelName(level: number): string {
      const levels = ['Debug', 'Info', 'Warning', 'Error', 'Critical'];
      return levels[level] || 'Unknown';
    }
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, and idempotentHint=true, establishing this as a safe read operation. The description adds valuable behavioral context beyond annotations: default behavior (50 most recent entries), pagination mechanics, time range constraints ('from/until must be used together'), and troubleshooting advice about server logging levels.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose, parameters, examples) and uses markdown formatting effectively. It's appropriately sized for a 6-parameter tool, though the parameter section could be more concise since it duplicates schema information. Most sentences earn their place by providing useful context.

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

Completeness4/5

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

For a read-only logging tool with comprehensive annotations and 100% schema coverage, the description provides good contextual completeness. It explains the tool's scope, filtering capabilities, default behavior, and includes practical examples. The main gap is the lack of output schema, but the description compensates by explaining what gets returned (log entries).

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 description coverage is 100%, so the schema already fully documents all 6 parameters. The description's parameter section largely repeats what's in the schema (though it adds the log level mapping 0-4). The examples provide some additional usage context, but overall the description adds limited value beyond the comprehensive schema.

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: 'Get recent log entries from Simplifier' with specific verb ('Get') and resource ('log entries'). It distinguishes itself from sibling tools (which are all businessobject/connector/datatype CRUD operations) by focusing on logging system access.

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 provides clear context about when to use it ('filter logs by level and time range') and what happens with no filters ('returns the 50 most recent log entries'). It also includes troubleshooting guidance for missing logs. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings.

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/simplifier-ag/simplifier-mcp'

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