Skip to main content
Glama

list_threads_in_process

Retrieve threads (tid, thread name, pid, upid) inside a single process by upid or process name, for targeted drill-down such as locating a compositor thread or auditing system_server 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.
Behavior4/5

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

With no annotations provided, the description covers key behaviors: 2000-row limit, empty result handled as error referencing list_processes, and cap overflow mitigation via execute_sql. It implies a read-only operation without stating it explicitly, but overall adds value.

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 somewhat long (5 sentences) but each sentence serves a purpose. It is well-structured with usage guidelines and parameter notes, though it could be slightly more concise without losing clarity.

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?

Given no output schema and only 2 parameters, the description covers all essential aspects: purpose, usage, parameters, limitations (row cap), error handling, and references to sibling tools. It is complete for effective tool invocation.

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?

Input schema has 100% coverage, but description adds context: which parameter to prefer (upid), that process_name requires exact match, and that upid takes precedence when both are set. This clarifies ambiguity beyond schema definitions.

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 and specifies the columns (tid, thread_name, pid, upid). It distinguishes itself from siblings like list_processes (which lists processes) and execute_sql (which 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?

Explicitly states when to use: 'drilling into a specific process picked from list_processes' and when not to: 'enumerating ALL threads across the whole trace — use execute_sql'. Provides clear context and alternatives.

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