Skip to main content
Glama
ChemInventory MCP Server

ChemInventory MCP Server

by niclas-gr

get_substance

Retrieves a chemical substance by name and CAS number or substance ID, and creates the record automatically when no matching entry exists.

Instructions

Substance records matching name and CAS number, or the substance with substance_id. Creates the substance if it does not exist yet.

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": {
      "name": "<name>",
      "cas": "<cas>"
    },
    "name": "get_substance"
  }
}

Input Schema

NameRequiredDescriptionDefault
casYesCAS number, or 'N/A' if none
nameYes
substance_idNoID of a known substance

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

The annotations only declare openWorldHint=false and destructiveHint=false, so the description earns real credit for disclosing the hidden upsert side-effect ('Creates the substance if it does not exist yet') — a write masked by a 'get' name. It stops short of saying what fields a newly created record receives, whether matching is fuzzy, or what happens on a partial/ambiguous match.

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?

Two short sentences, front-loaded with the lookup semantics, with no filler or restatement of the tool name. The side-effect disclosure follows immediately and is not buried.

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 not be explained. However, for a tool with a create side-effect and a schema/description tension over whether substance_id can be used alone, the description leaves material gaps about creation behavior and match resolution.

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 coverage is 67%, so baseline is around 3. The description adds that name and cas are joint matching keys and that substance_id is an alternative identifier, but it frames substance_id as a standalone path while the schema marks name and cas as required — an ambiguity the agent must resolve itself.

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 states a concrete resource (substance records) and the two lookup keys used to find them (name+CAS, or substance_id), which an agent can act on directly. It does not differentiate itself from siblings such as retrieve_substance_info or get_details, and the 'get_' name understates the create-on-miss behavior, so it falls short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: the agent can infer two lookup paths, but nothing says when this tool is preferred over retrieve_substance_info, get_details, or substance_files. There are no explicit exclusions, prerequisites, or guidance on which path to choose beyond the bare 'or'.

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