Skip to main content
Glama

analyze_logs

Search application logs on remote servers via SSH for specific strings or exception names, with optional time range filtering. Specify log files to focus search or bypass size limits.

Instructions

SSH to a server and search the app's logs for the given strings/exception names, returning matches with a couple of lines of context. Time filtering is best-effort: Liberty log entries carry a leading timestamp but continuation/stack-trace lines don't repeat it, so a match is only excluded when a timestamp was actually found and falls outside the window - anything unparseable is kept rather than silently dropped.

If log_files is omitted, every discovered log file is searched, except ones over ~25MB
(skipped and reported back) - call list_logs first and pass specific log_files to search
those anyway, or to scope the search down for a large deployment.

Args:
    server_ip: Hostname or IP address of the server to connect to over SSH.
    os_user: SSH username to authenticate as.
    ssh_key: Path to the private key file (on this machine) used for authentication.
    deployment_directory: Base deployment directory containing the application folder.
    application: Name of the application subfolder whose logs/ directory to search.
    search: Strings or exception names to search for (case-insensitive, literal match).
    start_time: Optional ISO-8601 timestamp; matches before this are excluded when detectable.
    end_time: Optional ISO-8601 timestamp; matches after this are excluded when detectable.
    log_files: Optional list of paths (relative to logs/, as returned by list_logs) to
        restrict the search to. Recommended for large deployments or to include files
        skipped by the size cap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchYes
os_userYes
ssh_keyYes
end_timeNo
log_filesNo
server_ipYes
start_timeNo
applicationYes
deployment_directoryYes
Behavior5/5

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

With no annotations, the description carries the full burden. It discloses key behaviors: best-effort time filtering, handling of unparseable timestamps, skipping files >25MB, and reporting skipped files. SSH authentication requirements are fully described.

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 an introductory paragraph and explicit Args list. It is front-loaded with core information. A minor nit: the 'Args' section could be slightly more concise, but overall it's efficient and informative.

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?

Given 9 parameters with no output schema, the description is quite complete. It covers behavior, edge cases, and alternative tool usage. However, it does not specify the exact return format (e.g., JSON) beyond 'matches with context', leaving a small gap.

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 description provides extensive parameter semantics beyond the schema (which only has type and title). It explains search case-insensitivity, time format (ISO-8601), log_files being relative paths, and the purpose of each parameter like server_ip, os_user, ssh_key.

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 it SSHs to a server and searches app logs for given strings/exception names, returning matches with context. It distinguishes from siblings via specific reference to list_logs and by providing scope choices.

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?

Explicitly tells when to use this tool: it details best practice for large deployments (call list_logs first and pass specific log_files), explains time filtering limitations, and warns about size caps.

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/Murtaza1211/mcp-server'

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