Skip to main content
Glama

Create a SCAPS device

scaps_create_device
DestructiveIdempotent

Creates a new SCAPS device definition from scratch, building up to seven layers with materials, defects, contacts, and numerical settings, then saves it as a .def file.

Instructions

Build a new device from scratch and save it as a .def file.

A layer may name a .material file ('material': 'CIGSe.material'); its properties apply first and explicit keys override them.

Input Schema

NameRequiredDescriptionDefault
nameYesNew definition name, saved in SCAPS def/.
layersYesLayers from the left (back) contact. Each maps set-command suffixes to values, e.g. {'name': 'absorber', 'thickness': 0.5, 'Eg': 1.55, 'chi': 3.9, 'epsilon': 10, 'NC': 2.2e18, 'NV': 1.8e19, 'mun': 2, 'mup': 2, 'NA': 1e15, 'radiative': 1e-11, 'absorption.file': 'material.abs', 'material': 'CIGSe.material', 'defects': [{'singleacceptor': null, 'gauss': null, 'Et': 0.6, 'Ntotal': 1e14, 'capture_cross_section.electron': 1e-15, 'capture_cross_section.hole': 1e-15}]}. Unset properties keep SCAPS defaults; up to 7 defects per layer.
optionsNoOther set commands, e.g. {'illumination.fromleft': null, 'numerical.Shockley-Queisser_limit.always': null}.
numericsNoNumerical settings stored in the .def 'convergence' section, which scripts cannot set, e.g. {'maxiter': 2000, 'clamp_psi': 0.25, 'termination_psi': 1e-4, 'defectdiscretisations': 9}.
overwriteNo
interfacesNoInterface defects by interface number (1 lies between layers 1 and 2), up to 3 each, e.g. {1: [{'Ntotal': 1e10, 'singledonor': null}]}.
left_contactNoe.g. {'workfunction': 5.1, 'Sn': 1e5, 'Sp': 1e7}; a work function switches flat band off.
right_contactNoAs left_contact.

Output Schema

NameRequiredDescriptionDefault
notesYes
deviceYes
run_idYes
definitionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly=false, destructive=true, idempotent=true, and openWorld=false, so the description does not need to carry the full safety burden. It adds useful context that the result is saved as a .def file and that layer material files are applied before explicit overrides, but it omits overwrite behavior and file-collision risk despite the destructive annotation.

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?

The description is two short sentences with the primary purpose front-loaded and the material-override rule efficiently appended. Every sentence adds useful information without waste.

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?

With a rich schema, output schema, and annotations present, the description is largely sufficient for correct invocation. The main remaining gap is overwrite/destructive behavior, which is only flagged by annotations and not explained in the description.

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

Parameters4/5

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

Schema coverage is high at 88%, so the schema already documents most parameters. The description adds meaningful semantics for the layers parameter by explaining that a named .material file is applied first and explicit keys override it, which is not fully captured in the schema example.

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 states a specific verb and resource: build a new device from scratch and save it as a .def file. The phrase 'from scratch' distinguishes this from edit_device and import_file, which are adjacent siblings in the toolset.

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 creation context is clear from 'build a new device from scratch,' which implies use when no existing device is being modified. However, it does not explicitly name edit_device or import_file as alternatives or state when not to use this tool.

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