Skip to main content
Glama

list_threads_in_process

Read-onlyIdempotent

List threads in a process by exact name or unique process ID. Ideal for drilling down from process overview, with pagination for large thread sets.

Instructions

List threads in one process or same-named process set: tid, thread_name, pid, upid, machine_id. Limit 2000, cap 5000.

Use when: drilling into a process from list_processes.

Don't use for: ALL trace threads — use execute_sql on thread.

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. Optional limit and offset page large result sets; both accept numbers or numeric strings.

Output: exact row_count, returned_rows, truncated/has_more; rows are ordered by pid/tid. process_counts reports per-upid counts for same-name fan-out.

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

When truncated=true, increase offset or drill down with upid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional max rows to return. Defaults to 2000, capped at 5000. Accepts both numbers and numeric strings. Must be > 0 when set.
offsetNoOptional row offset for pagination. Defaults to 0. Accepts both numbers and numeric strings.
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?

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false. The description adds valuable behavioral details: limit cap (2000 default, 5000 max), pagination with offset, output structure (row_count, returned_rows, truncated/has_more), ordering by pid/tid, and empty result behavior (returns error pointing to list_processes). No contradiction with annotations.

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: what it does, when to use, parameter guidance, and output details. Every sentence adds value, and there is no redundancy. Despite being detailed, it remains concise and easy to parse.

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, the description thoroughly explains the output format (exact fields, ordering, pagination flags) and edge cases (empty results, truncation). It also references related tools for drill-down. This covers all necessary contextual information for an agent to use the tool correctly.

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 significant value beyond the schema: explains when to prefer upid over process_name, that both accept numeric strings, default values for limit and offset, and that upid takes precedence. This clarifies usage intent beyond the raw 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 in one process or same-named process set, with specific columns (tid, thread_name, pid, upid, machine_id). It distinguishes itself from siblings like `execute_sql` on `thread` and `list_processes`. The verb 'list' and resource 'threads in process' are specific and unambiguous.

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 process from `list_processes`'. Also states when not to use: 'Don't use for: ALL trace threads — use `execute_sql` on `thread`'. Provides guidance on parameter choice: 'use either `upid` or `process_name`', with explanation of precedence and use cases like disambiguating same-named processes.

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