Skip to main content
Glama
iamvinitk
by iamvinitk

Read main-process stdout/stderr

get_main_logs

Retrieve captured log lines from the Electron app's main process. Filter by stream, timestamp, or regex to identify issues.

Instructions

Returns the spawned process's captured log lines (stdout + stderr interleaved in order of receipt). These typically include the app's main-process startup lines and any backend/proxy output it prints when running packaged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession id.
grepNoRegex (JS syntax) matched against each line's text. Use `^\[API\]` to see only bundled-API output, for example.
linesNoLast N lines. Default: all buffered (up to 5000).
sinceNoOnly lines with ts > this epoch-millisecond value.
streamNoFilter by stream (default: both).
Behavior4/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 transparency. It discloses that logs are interleaved in order of receipt, supports stream filtering, and has a default buffer limit (up to 5000 lines). Side effects are not mentioned, but likely none exist. It does not discuss rate limits or data persistence.

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 two sentences, front-loaded with the main purpose, and contains no extraneous text. Every sentence adds value.

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 5 parameters, 100% schema coverage, no output schema, and no annotations, the description is fairly complete. It explains the content and ordering of logs, and mentions the buffer limit. It could be improved by clarifying session association (id parameter) or behavior when no logs exist, but overall it is adequate.

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 baseline is 3. The description adds some context about interleaving and default line count, but does not enhance individual parameter meanings beyond what the schema already provides. No per-parameter elaboration is present.

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 returns captured log lines (stdout+stderr interleaved) for a spawned process, and specifies typical content like main-process startup lines and backend/proxy output. This distinguishes it from siblings like get_ipc_log or get_console_messages.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning what the logs typically contain, but it does not explicitly state when to use this tool versus alternatives like get_ipc_log or clear_logs. No exclusions or when-not-to-use guidance is provided.

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/iamvinitk/electron-mcp'

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