Skip to main content
Glama

list_threads_in_process

List threads inside a process by upid or process name. Returns tid, thread_name, pid, upid for up to 2000 threads.

Instructions

List threads inside one process: tid, thread_name, pid, upid. Limit 2000 rows.

Use when: drilling into a specific process picked from list_processes — e.g. finding a renderer's compositor thread, or auditing all threads under system_server.

Don't use for: enumerating ALL threads across the whole trace — use execute_sql against the thread table for that.

Parameters: pass either upid (trace-internal id, precise — prefer when multiple processes share a name like 'Renderer') or process_name (exact match). upid wins when both are set.

Empty result: returned as an error pointing at list_processes for available candidates.

When the 2000-row cap is hit (system_server, Chrome renderer-fork): drill down via execute_sql against the thread table directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
process_nameNoProcess name to match exactly (e.g. "com.android.chrome", "/system/bin/init"). Either this or `upid` must be provided.
upidNoProcess upid (the trace-internal unique id from `list_processes`). Takes precedence over `process_name` when both are set — useful for disambiguating same-named processes (e.g. multiple Renderer instances). Accepts both numbers and numeric strings.
Behavior5/5

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

Despite no annotations, the description fully discloses behavior: a 2000-row cap, what happens when the cap is hit (use execute_sql), empty result behavior (error pointing to list_processes), and parameter precedence. No contradictions.

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 well-structured with clear sections (purpose, when to use, parameter guidance, edge cases). It is concise without unnecessary details, front-loading the core function.

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

Completeness5/5

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

For a tool with 2 parameters, no output schema, and clear siblings, the description covers all needed aspects: purpose, usage context, parameter selection, limits, error handling, and escalation path. No gaps.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by explaining why upid is preferred (disambiguates same-named processes), the precedence rule (upid wins), and that upid accepts both numbers and numeric strings, which goes beyond the 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 lists threads inside a specific process with columns tid, thread_name, pid, upid. It distinguishes from sibling tools like list_processes (which lists processes) and execute_sql (for broader queries).

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?

Explicit 'Use when' and 'Don't use for' sections provide clear context. It names execute_sql as the alternative for enumerating all threads and offers parameter selection guidance (prefer upid for disambiguation).

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/tooluse-labs/perfetto-mcp-rs'

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