Skip to main content

@svatah/yam-tool

MCP tool server exposing stories as deterministic tools

Exports

ExportKindSignature
callToolfunctionexport async function callTool(Call one tool.
definitionOffunctionexport function definitionOf(story: Story): ToolDefinitionOne story's tool definition.
descriptionOffunctionexport function descriptionOf(story: Story): stringWhat the tool says it does.
Exposedinterfaceexport interface Exposed
exposeListfunctionexport function exposeList(config: Config, flag: string | undefined): string[]The story names --expose and the config between them ask for.
Exposureinterfaceexport interface Exposure
exposureForfunctionexport function exposureFor(Resolve --expose "a,b" (or config.tool.expose) against the plan.
inputSchemaOffunctionexport function inputSchemaOf(story: Story): ToolSchemaThe inputSchema for a story (LLD §13.3).
JsonSchemaPropertyinterfaceexport interface JsonSchemaProperty
Refusedinterfaceexport interface Refused
requiresIdempotentfunctionexport function requiresIdempotent(config: Config): booleanWhether tool.requireIdempotent applies (LLD §13.3).
ToolDefinitioninterfaceexport interface ToolDefinitionOne story, as a tool an MCP client can see and call.
toolNameOffunctionexport function toolNameOf(story: string): stringA story name as an MCP tool name: lower case, underscores, nothing else.
ToolResultinterfaceexport interface ToolResultWhat a tool call returns to the agent (LLD §13.3).
ToolSchemainterfaceexport interface ToolSchemaA JSON Schema for one story's inputs, as MCP's inputSchema.
ToolServerOptionsinterfaceexport interface ToolServerOptions
toolsForfunctionexport function toolsFor(options: Pick<ToolServerOptions, "plan" | "config" | "expose">):The tools a project exposes, and the reasons for the ones it does not.