Skip to main content
Glama

nproc

Read-only

Retrieve the number of available CPU cores to make parallelism decisions in agent workflows. Returns JSON with core count or plain integer with --raw.

Instructions

Return the number of available CPU processing units. Read-only, no side effects. Returns JSON with the core count; use --raw for plain integer. Use to make parallelism decisions in agent workflows. Not for system runtime info — use 'uptime'. Not for architecture info — use 'arch' or 'uname'. See also 'uptime', 'arch'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNoWrite the processor count without a JSON envelope.
Behavior5/5

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

The description adds behavioral context beyond the annotation 'readOnlyHint: true' by clarifying 'Read-only, no side effects' and detailing the output format: 'Returns JSON with the core count; use --raw for plain integer.' This covers what the tool returns and how to modify output.

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 three clear sentences: purpose, behavior, and usage guidance. No redundant or overly verbose content. Every sentence adds value and is front-loaded with the core purpose.

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 the tool's simplicity (one optional parameter, no output schema, clear annotations), the description fully covers its purpose, usage guidelines, behavioral transparency, and parameter semantics. 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% with a description for the 'raw' parameter. The description adds semantic value by explaining that 'use --raw for plain integer' alters the output format, which complements the schema's explanation of removing the JSON envelope. This 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 explicitly states 'Return the number of available CPU processing units', which is a specific verb and resource. It distinguishes itself from sibling tools like 'arch' and 'uptime' by indicating what it is not for.

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?

Clearly states when to use ('for parallelism decisions in agent workflows') and explicitly provides alternatives for other use cases: 'Not for system runtime info — use 'uptime'. Not for architecture info — use 'arch' or 'uname'.' Also includes 'See also' references.

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/caseSHY/AI-CLI'

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