Skip to main content
Glama

list_threads_in_process

Read-onlyIdempotent

Retrieve threads from a specific process using its upid or name. Supports pagination with limit and offset to navigate large thread lists.

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
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.
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.
trace_idNoOptional trace id returned by `load_trace`. Omit to use the active trace.
process_nameNoProcess name to match exactly (e.g. "com.android.chrome", "/system/bin/init"). Either this or `upid` must be provided.
Behavior5/5

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

Annotations indicate safe read-only behavior (readOnlyHint, idempotentHint, destructiveHint false). The description adds details on pagination (truncated, has_more), ordering, empty result error pointing to list_processes, and process_counts for same-name fan-out.

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?

Well-structured with clear sections and bullet points. Front-loaded with essential info. Slightly lengthy but every sentence adds value. Could be slightly more concise but overall effective.

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?

Comprehensive coverage given 5 parameters, no output schema, but rich annotations. Includes usage context, parameter details, behavioral traits (pagination, ordering, empty results), and error handling.

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?

With 100% schema coverage, baseline is 3. The description adds significant value by explaining parameter trade-offs (upid vs process_name), precedence, accepted types (numeric strings), and pagination usage, exceeding schema documentation.

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 for a specific process or same-named process set, specifying output fields (tid, thread_name, pid, upid, machine_id) and limits. It distinguishes itself from siblings like list_processes and execute_sql.

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 with direct references to list_processes and execute_sql, providing 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