Skip to main content
Glama
jmpijll

unraid-code-mode-mcp

by jmpijll

Execute Unraid GraphQL operations

execute

Run JavaScript in a sandbox to query or mutate Unraid's GraphQL API using the unraid.local namespace.

Instructions

Run Unraid GraphQL operations by writing JavaScript that uses the unraid.local namespace.

Although the sandbox is JavaScript, the calls below appear synchronous — await is supported and recommended. Each call returns once the host-side HTTP request settles.

Surfaces:

  • unraid.local.graphql({ query, variables, operationName }) — POST any GraphQL document directly to /graphql. Returns the unwrapped data field.

  • unraid.local.query.<fieldName>({ args, fields }) — typed query call. args map to GraphQL variables; fields is either a GraphQL selection-set string (no wrapping braces) or a shorthand array of leaf field names. fields is required for non-scalar return types.

  • unraid.local.mutation.<fieldName>({ args, fields }) — typed mutation call, same rules.

  • unraid.local.request({ method, path, body, headers }) — raw HTTP escape hatch for endpoints outside GraphQL. Returns { status, body, headers }.

  • unraid.local.spec{ title, version, sourceUrl, queryCount, mutationCount } for diagnostics.

Operations are async — use await. The final expression is the tool result.

Examples

// Read system info via a typed query.
const info = await unraid.local.query.info({
  fields: ['os { distro release kernel }', 'versions { unraid api }', 'cpu { manufacturer brand cores }'].join(' '),
});
return info;
// List Docker containers with a shorthand selection.
const containers = await unraid.local.query.dockerContainers({
  fields: ['id', 'names', 'state', 'status', 'image'],
});
return containers.map(function (c) { return { name: c.names[0], state: c.state }; });
// Raw GraphQL document — handy for fragments and aliases.
const data = await unraid.local.graphql({
  query: 'query { array { state capacity { kilobytes { free total } } } }',
});
return data;

Limits

  • Hard ceiling on API calls per execute; exceeded → error.

  • Sandbox memory + time bounded.

  • Credentials never enter the sandbox.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to execute against the live Unraid GraphQL API. Use await — operations are async.
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: async execution, sandbox memory/time bounds, credential isolation, and API call limits leading to errors. It also explains return value structures, leaving little ambiguity about the tool's behavior.

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 well-structured with clear sections (overview, methods, examples, limits) and front-loads the purpose. While each section contributes value, the examples are somewhat lengthy, and the overall length could be trimmed slightly 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, the description covers return types, error conditions, limits, and provides multiple examples. It sufficiently equips an agent to use the tool correctly, lacking only explicit comparison to siblings but otherwise complete.

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?

The single parameter 'code' has a basic schema description, but the tool description adds immense value by detailing how to write the JavaScript, available methods, and examples. This significantly enhances the agent's understanding beyond the schema alone.

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's purpose as executing JavaScript to run Unraid GraphQL operations using the `unraid.local` namespace. It differentiates from the sibling 'search' by implying a code execution context rather than a simple search, and provides specific methods and examples.

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 offers extensive guidance on internal usage: async/await, typed vs raw calls, examples, and limits. However, it does not explicitly contrast with the sibling tool 'search' or state when to use this tool versus that alternative, which would improve cross-tool decision-making.

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/jmpijll/unraid-code-mode-mcp'

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