Skip to content

Selections

Normative language (MUST/SHOULD/MAY) follows the conventions defined in Conformance Language.

Primitive: Selection (5th primitive)


A Selection is a named collection of Primitives (Tools, Resources, Prompts, Skills) that belong together thematically. Selections enable agents to activate a coherent set of capabilities with a single operation.


export const selection = {
namespace: 'evm-research',
name: 'contract-analysis',
version: 'flowmcp/4.0.0',
description: 'Tools and Skills for Smart Contract analysis on EVM chains',
whenToUse: 'Activate this Selection when the user wants to analyze, debug, or inspect a smart contract.',
tools: [
'etherscan-io/tool/getSmartContractAbi',
'etherscan-io/tool/getContractCreation'
],
skills: [ 'etherscan-io/skill/contract-deep-dive' ],
resources: [],
prompts: []
}
FieldTypeDescription
namespacestringNamespace owning this selection
namestringSelection name (kebab-case)
versionstringMust be 'flowmcp/4.0.0'
descriptionstringWhat this selection provides
whenToUsestringWhen an agent SHOULD activate this selection (SEL001)
toolsstring[]Tool Primitive-IDs included
skillsstring[]Skill Primitive-IDs included
resourcesstring[]Resource Primitive-IDs included
promptsstring[]Prompt Primitive-IDs included

At least one array MUST be non-empty (SEL002).

Selection ID: namespace/selection/name (2 slashes)

Example: evm-research/selection/contract-analysis

schemas/v4.1.0/selections/
evm-research/
contract-analysis.mjs

Directory selections/ is at root level, alongside providers/ and agents/.

CodeSeverityRule
SEL001errorwhenToUse is required and MUST NOT be empty
SEL002errorAt least one array (tools/skills/resources/prompts) must be non-empty
SEL003errorAll referenced Primitive-IDs MUST be resolvable
SEL004infoIf a Selection includes inline-skill objects, SkillValidator runs on each. Recorded in the validation report. Optional — present only when inline skills exist.

A Selection-File can be used as a transitive test trigger via:

flowmcp dev test single <selection-file>

This:

  1. Loads the Selection.
  2. Resolves every member ID via the IdResolver (transitive).
  3. Recursively gathers tests from each member schema (Tools, Resources, Skills, Prompts).
  4. Executes all member tests and aggregates per-primitive PASS/FAIL counts.
  5. Reports an aggregate status: M/N Members PASS.

Important: The Selection itself has no execution tests — it is a grouping. The test-trigger model uses Selections as batch loaders for transitive testing of their members.

When a Selection defines inline skills (selection.skills[] entries that are full Skill objects rather than ID references), each inline-skill is treated as a Skill-Test target:

  • Structural validation runs (placeholders resolvable, prefills declared)
  • The inline skill is then bound to the Selection’s namespace for context
┌─ Selection: defi-pools-toolkit
│ ├─ SEL003: all member IDs resolvable ✓
│ │
│ ├─ Tools (1)
│ │ └─ dexscreener.searchPair 3/3 PASS
│ │
│ ├─ Resources (2)
│ │ ├─ pools.searchPoolsByToken 3/3 PASS
│ │ └─ tokens.getTokenBySymbol 3/3 PASS
│ │
│ └─ Skills (1)
│ └─ analyze-token-pools
│ ├─ Structural (Placeholder-Resolution) ✓
│ └─ Prefill executed (2 Resources) ✓
└─ Selection Aggregat: 4/4 Members PASS

If a Selection includes inline-skill objects, the SelectionValidator additionally runs SkillValidator on each. This is recorded as SEL004 in the validation report. Optional — present only when inline skills exist.

  • If a referenced Primitive-ID is unresolvable, the Selection fails to load with a clear error message.
  • Example: "Selection evm-research/selection/contract-analysis: Reference 'etherscan-io/tool/getSmartContractAbi' not found"
  • AGT030: Agent startup fails if a referenced Selection cannot be loaded.