Skip to main content
Glama

list_threads_in_process

Lists threads inside a process by upid or process name. Use after list_processes to drill into a process, identifying threads like compositor or auditing all threads under system_server.

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?

With no annotations, the description fully discloses behavior: 2000-row limit, empty result returns error with pointer to list_processes, and suggestion to use execute_sql when cap is hit. Also notes parameter precedence.

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 and concise. First sentence states purpose and output; subsequent bullet points cover use cases, exclusions, parameter guidance, and edge cases. No wasted words.

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?

Despite no output schema, the description lists output columns. It covers all relevant context: parameter requirements, empty result processing, row cap handling, and alternative tools. Complete for a tool of this complexity.

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?

Schema coverage is 100%, but the description adds significant value: explains which parameter to prefer (upid for precise disambiguation), that upid wins when both set, and provides context on when to use each. This goes beyond the schema's description.

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 one process with output columns (tid, thread_name, pid, upid). It distinguishes from sibling tools like list_processes (lists processes) and execute_sql (can enumerate all threads).

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 usage guidance: when to use (drilling into a specific process from list_processes) and when not to (use execute_sql for all threads). Also explains parameter selection, including preference of upid over process_name 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