MCPcopy Create free account
hub / github.com/freecodexyz/free-code / tool

Function tool

src/entrypoints/agentSdkTypes.ts:73–88  ·  view source on GitHub ↗
(
  _name: string,
  _description: string,
  _inputSchema: Schema,
  _handler: (
    args: InferShape<Schema>,
    extra: unknown,
  ) => Promise<CallToolResult>,
  _extras?: {
    annotations?: ToolAnnotations
    searchHint?: string
    alwaysLoad?: boolean
  },
)

Source from the content-addressed store, hash-verified

71}
72
73export function tool<Schema extends AnyZodRawShape>(
74 _name: string,
75 _description: string,
76 _inputSchema: Schema,
77 _handler: (
78 args: InferShape<Schema>,
79 extra: unknown,
80 ) => Promise<CallToolResult>,
81 _extras?: {
82 annotations?: ToolAnnotations
83 searchHint?: string
84 alwaysLoad?: boolean
85 },
86): SdkMcpToolDefinition<Schema> {
87 throw new Error('not implemented')
88}
89
90type CreateSdkMcpServerOptions = {
91 name: string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected