Manifests
The SAM manifests of this platform, as the Smarter Project MCP server’s get_manifest_schema tool reads them.
Each resource kind’s JSON Schema and example manifest are committed in
smarter.apps.api.v1.contract.sam, beside the api contract, as
sam/<Kind>.schema.json and sam/<Kind>.example.json. They are the platform’s own,
so they describe exactly the manifests that this platform accepts.
A schema is too large, up to about 50 KB, and too nested, with $ref and anyOf, for
an LLM to read well. manifest_fields() flattens it into one ManifestField
per field, with its dotted path, e.g. spec.config.value, its type, whether it is
required, its default and its description. The read-only status is left out: it is
never written in a manifest.
Note
Experimental. The MCPServer was designed and coded by Claude Code (Anthropic’s Claude Opus 5.5), with Lawrence McDaniel as co-author. It is experimental, and will be documented.
- class smarter.apps.mcpserver.manifests.ManifestField(*, path, type, required, default=None, description='')[source]
Bases:
BaseModelOne field of a manifest, flattened from its kind’s JSON Schema.
- model_config = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- smarter.apps.mcpserver.manifests.find_kind(name, directory='/home/runner/work/smarter/smarter/smarter/smarter/apps/api/v1/contract/sam')[source]
Return the kind that a name means, ignoring case.
- smarter.apps.mcpserver.manifests.manifest_example(kind, directory='/home/runner/work/smarter/smarter/smarter/smarter/apps/api/v1/contract/sam')[source]
Return a kind’s example manifest.
- smarter.apps.mcpserver.manifests.manifest_fields(schema)[source]
Return every field of a manifest, from its kind’s JSON Schema, without the read-only
status.- Parameters:
- Return type:
- Returns:
The fields, parents before their children, in the schema’s order.
Example usage:
fields = manifest_fields(manifest_schema("Secret")) fields[-1].path # 'spec.config.value'
- smarter.apps.mcpserver.manifests.manifest_kinds(directory='/home/runner/work/smarter/smarter/smarter/smarter/apps/api/v1/contract/sam')[source]
Return the kinds that have a committed JSON Schema.