Skip to main content
Glama

reinvent_custom_scoring_component

Generate a REINVENT4 scoring component plugin (comp_*.py) from your scoring logic and automatically smoke-test it to ensure it works with sample SMILES.

Instructions

Generate a valid comp_*.py plugin file for REINVENT4.

Based on the canonical template from scoring_function.md. No reinstall needed — REINVENT4 discovers comp_*.py files at runtime.

IMPORTANT: Always provide implementation_code. Write the complete call body as plain unindented Python before calling this tool, then pass it here. Indentation is added automatically. This writes the full implementation in one atomic operation. If omitted, a TODO placeholder is written and the file cannot be edited afterward due to permissions.

When implementation_code is provided, the generated plugin is immediately smoke-tested (import, instantiate, call on sample SMILES, contract check). The test_result appears in the response; on failure, regenerate with corrected implementation_code.

Args: component_name: Python class name (e.g. 'MyQSARModel') description: What this component scores scoring_logic: How to compute the score — plain English, pseudocode, or code parameters: List of {name, type, description} dicts for user-configurable inputs component_tag: '_component' (standard), 'filter' (zeros total if 0), 'penalty' (multiplier) use_molcache: If True, call receives List[Chem.Mol]; else List[str] dependencies: External packages required output_dir: Where to write comp*.py (default: reinvent_plugins/components/) implementation_code: Complete body of call as unindented Python. test_after_generate: Run the smoke test after writing (default True). test_smiles: Override SMILES used by the smoke test. test_params: Per-endpoint parameter values for the smoke test, e.g. {"threshold": 0.5} — scalars are list-wrapped automatically.

Returns file path, source code, TOML snippet, and test_result (when tested).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_dirNo
parametersNo
descriptionYes
test_paramsNo
test_smilesNo
dependenciesNo
use_molcacheNo
component_tagNo__component
scoring_logicYes
component_nameYes
implementation_codeNo
test_after_generateNo
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: atomic write operation, runtime discovery, TODO placeholder behavior, permission restrictions preventing later edits, automatic smoke testing, and the exact return payload. This goes well beyond what annotations would typically provide.

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 well-structured: a concise purpose statement, a critical IMPORTANT callout, a bulleted Args list, and a Returns line. Every sentence adds value—no fluff or redundancy—and the most critical usage requirement is front-loaded.

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?

For a tool with 12 parameters, no output schema, and no annotations, the description fully covers inputs, outputs, side effects, and error behavior. It even explains the smoke test flow and says that test_result appears in the response, making the invocation contract 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 schema has 0% coverage from description text, but the description's Args block documents all 12 parameters with meaning, defaults, and examples (e.g., test_params with scalar list-wrapping). This fully compensates for the schema's lack of descriptions, providing agents with the necessary context to fill parameters correctly.

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 opens with a specific verb-object statement: 'Generate a valid comp_*.py plugin file for REINVENT4.' This clearly states the tool's primary function and distinguishes it from sibling tools like reinvent_test_scoring_component or reinvent_sampling by focusing on plugin generation.

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 IMPORTANT section provides explicit usage guidance: always provide implementation_code, write it as unindented Python, indentation is added automatically, and the file cannot be edited afterward. It also explains when the smoke test runs. However, it does not explicitly name alternatives or state when not to use this tool versus sibling tools, so it falls short of a 5.

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/pregHosh/Solitarius-mcp'

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