Skip to main content
Glama

fc_layer_weights

Calculate fully connected layer weight count from input shape and neuron count, including bias terms, to size neural-network layers precisely.

Instructions

Weights in a fully connected layer: (inputs + 1) × neurons.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input_shape": "<input_shape>",
      "n_neurons": "<n_neurons>"
    },
    "name": "fc_layer_weights"
  }
}

Input Schema

NameRequiredDescriptionDefault
n_neuronsYes
input_shapeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden, but the operation is a deterministic arithmetic computation with no side effects, auth needs, or rate limits to disclose. The formula does reveal the core behavior (including the '+1' bias term), which is genuine context beyond the name. It stops short of stating the tool returns a count rather than weight values, which is the one behavioral distinction that matters here.

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?

A single short sentence with zero waste; the formula is front-loaded and immediately actionable. It loses a point only because the fragmentary phrasing forces the reader to supply the verb and the object ('number of').

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

Completeness3/5

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

An output schema exists, so return values need no explanation, and the formula effectively defines the result. For a two-parameter pure-computation tool this is close to sufficient, but the missing statement of what the tool actually returns (a count vs. a weight tensor) leaves a small but real gap.

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% and both parameters ('n_neurons', 'input_shape') are undocumented in the schema. The description partly compensates: 'inputs' maps to input_shape (the product of its dimensions) and 'neurons' maps to n_neurons, and the '+1' explains the bias unit. It still leaves ambiguity about how a shape array collapses to a scalar input count.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource (weights in a fully connected layer) and gives the counting formula '(inputs + 1) × neurons', which is more informative than the bare tool name. However it is a noun fragment with no verb, so it never explicitly says the tool computes/returns a count of weights rather than the weights themselves. The formula distinguishes it in spirit from siblings like cnn_layer_size, but only implicitly.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of prerequisites, and no reference to any alternative such as cnn_layer_size or weight_update. The agent must infer usage purely from the tool name and the formula. Nothing is misleading, but no routing help is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.