mcp-sdk
No long description provided.
Installation
dagger install github.com/shykes/x/mcp-sdk@4513bad7bca58fc97e988201666c613d64252f93Entrypoint
Return Type
McpSdk !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| toolName | String ! | "mcp-runtime" | No description provided |
| stdioTool | File | - | No description provided |
Example
dagger -m github.com/shykes/x/mcp-sdk@4513bad7bca58fc97e988201666c613d64252f93 call \
--tool-name stringfunc (m *MyModule) Example(toolName string) *dagger.McpSdk {
return dag.
McpSdk(toolName)
}@function
def example(tool_name: str, ) -> dagger.McpSdk:
return (
dag.mcp_sdk(tool_name)
)@func()
example(toolName: string, ): McpSdk {
return dag
.mcpSdk(toolName)
}Types
McpSdk 🔗
source() 🔗
Return Type
Directory ! Example
dagger -m github.com/shykes/x/mcp-sdk@4513bad7bca58fc97e988201666c613d64252f93 call \
--tool-name string sourcefunc (m *MyModule) Example(toolName string) *dagger.Directory {
return dag.
McpSdk(toolName).
Source()
}@function
def example(tool_name: str, ) -> dagger.Directory:
return (
dag.mcp_sdk(tool_name)
.source()
)@func()
example(toolName: string, ): Directory {
return dag
.mcpSdk(toolName)
.source()
}toolName() 🔗
Return Type
String ! Example
dagger -m github.com/shykes/x/mcp-sdk@4513bad7bca58fc97e988201666c613d64252f93 call \
--tool-name string tool-namefunc (m *MyModule) Example(ctx context.Context, toolName string) string {
return dag.
McpSdk(toolName).
ToolName(ctx)
}@function
async def example(tool_name: str, ) -> str:
return await (
dag.mcp_sdk(tool_name)
.tool_name()
)@func()
async example(toolName: string, ): Promise<string> {
return dag
.mcpSdk(toolName)
.toolName()
}stdioTool() 🔗
Return Type
File ! Example
dagger -m github.com/shykes/x/mcp-sdk@4513bad7bca58fc97e988201666c613d64252f93 call \
--tool-name string stdio-toolfunc (m *MyModule) Example(toolName string) *dagger.File {
return dag.
McpSdk(toolName).
StdioTool()
}@function
def example(tool_name: str, ) -> dagger.File:
return (
dag.mcp_sdk(tool_name)
.stdio_tool()
)@func()
example(toolName: string, ): File {
return dag
.mcpSdk(toolName)
.stdioTool()
}codegen() 🔗
Return Type
GeneratedCode !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(toolName string, modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.GeneratedCode {
return dag.
McpSdk(toolName).
Codegen(modSource, introspectionJson)
}@function
def example(tool_name: str, mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.GeneratedCode:
return (
dag.mcp_sdk(tool_name)
.codegen(mod_source, introspection_json)
)@func()
example(toolName: string, modSource: ModuleSource, introspectionJson: File): GeneratedCode {
return dag
.mcpSdk(toolName)
.codegen(modSource, introspectionJson)
}moduleRuntime() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(toolName string, modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.Container {
return dag.
McpSdk(toolName).
ModuleRuntime(modSource, introspectionJson)
}@function
def example(tool_name: str, mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.Container:
return (
dag.mcp_sdk(tool_name)
.module_runtime(mod_source, introspection_json)
)@func()
example(toolName: string, modSource: ModuleSource, introspectionJson: File): Container {
return dag
.mcpSdk(toolName)
.moduleRuntime(modSource, introspectionJson)
}