Noizu.MCP.Server.Tool.Spec (Noizu MCP v0.1.1)

Copy Markdown View Source

Normalized runtime descriptor for one registered tool.

Every tool module — classic use Noizu.MCP.Server.Tool modules and use Noizu.MCP.Server.Toolkit multi-tool modules alike — exports __mcp_tools__/0 returning a list of these. The server runtime (Noizu.MCP.Server.Features.Tools.expand/1) works exclusively on specs: the definition is what tools/list advertises, module/fun/arity are how tools/call invokes the handler, and cast_plan/output_schema drive argument casting and structured-output checking.

Summary

Types

t()

@type t() :: %Noizu.MCP.Server.Tool.Spec{
  arity: 0..2,
  cast_plan: list() | nil,
  definition: Noizu.MCP.Types.Tool.t(),
  fun: atom(),
  hidden: boolean(),
  module: module(),
  output_schema: map() | nil
}