Skip to main content
Glama

benchmark

Run code with increasing input sizes to measure execution time and fit growth curves for estimating Big-O complexity.

Instructions

Empirically measure time complexity by running code at increasing input sizes.

Contract: the code must read an integer N from stdin (first line) and do work sized by N. codecalc runs it at each size in sizes (comma-separated) and fits the growth curve to estimate Big-O (O(1), O(log n), O(n), O(n log n), O(n^2)...). Example python: 'import sys\nn=int(sys.stdin.readline()); s=0\nfor i in range(n): s+=i\nprint(s)'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
sizesNo100,1000,10000,100000
timeoutNo
languageNopython3
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the execution model (runs code at each size, fits growth curve) and the N-from-stdin contract. It does not mention sandboxing, error handling, or side effects, but for a benchmark/execution tool the described behavior is sufficiently transparent for an agent to anticipate outcomes.

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 a compact paragraph with a purpose statement, a contract, and an example. It is front-loaded and each sentence adds value. The mention of 'codecalc' is slightly vague but not distracting; overall it is appropriately sized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is moderately complex (executing code, fitting curves), and the description covers the core workflow and input requirements. It does not describe the exact output format (e.g., how the Big-O estimation is presented), nor does it mention failure modes, but the provided example and contract give enough context for an agent to use it correctly in most scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the meaning of `code` (must read N from stdin) and `sizes` (comma-separated sizes), but gives no explanation for `timeout` or `language` beyond what the schema defaults imply. The example helps, but two of four parameters remain underspecified.

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 opens with a specific verb+resource: 'Empirically measure time complexity by running code at increasing input sizes.' This clearly distinguishes it from static analysis siblings like analyze_complexity, and explicitly mentions the Big-O output. The purpose is unambiguous and differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on usage: it requires code that reads an integer N from stdin and does work sized by N. However, it does not explicitly mention alternatives or when not to use this tool, so it stops short of a 5. The contract is clear enough for most cases.

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/The-40-Thieves/codecalc'

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