Skip to main content
Glama

cnn_layer_size

Computes convolutional layer output dimensions, neuron count, and shared weight count from input shape, filter size, stride, padding, and filter count.

Instructions

Convolutional layer output volume, number of neurons and number of (shared) weights. input_shape: [A, B, C]; filter_size: [P, Q] or [P, Q, C].

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>",
      "filter_size": "<filter_size>",
      "n_filters": "<n_filters>"
    },
    "name": "cnn_layer_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
strideNo
paddingNo
n_filtersYes
filter_sizeYes
input_shapeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/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 full disclosure burden. It does indicate that the tool returns three computed quantities and that weights are shared, which is the key behavioral fact for a CNN layer. It never states that the operation is a pure side-effect-free calculation, nor does it mention restrictions on shape validity or error 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?

Two short sentences with the output quantities front-loaded and the input formats appended. Nothing is wasted, though the terseness borders on under-specification rather than optimal economy.

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?

The output schema exists, so return values need not be described, and the two structurally ambiguous array parameters are covered. For a five-parameter computation tool, however, the absence of any note on stride and padding semantics (defaults are in the schema, but their effect on the output volume is not) leaves a meaningful 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%, so the description must supply meaning, and it usefully explains the two ambiguous array parameters: input_shape as [A, B, C] and filter_size as [P, Q] or [P, Q, C]. It says nothing about stride, padding, or n_filters, so three of five parameters rely on bare titles and defaults.

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

Purpose4/5

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

The description names the concrete quantities computed: output volume, neuron count, and shared-weight count for a convolutional layer. That is a specific verb-plus-resource statement an agent can act on. It does not, however, contrast itself with siblings such as fc_layer_weights, so sibling differentiation is left implicit.

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 explicit statement of when to use this tool versus alternatives, nor any prerequisites or exclusions. An agent can infer from the name that this is a CNN sizing calculation, but nothing in the text routes it there or warns it away from fc_layer_weights.

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