Documentation
¶
Overview ¶
Package mcp compiles route exposures into an immutable Datly MCP catalog and a fresh upstream protocol registry.
Index ¶
- Constants
- type Catalog
- type ComponentLoader
- type ComponentRouteResolver
- type Config
- type Service
- func (s *Service) Authorization() *authorization.Policy
- func (s *Service) Catalog() *Catalog
- func (s *Service) PrepareTool(ctx context.Context, name string) error
- func (s *Service) PrepareTools(ctx context.Context) error
- func (s *Service) ReadResource(ctx context.Context, request *schema.ReadResourceRequest) (*schema.ReadResourceResult, *jsonrpc.Error)
- func (s *Service) Registry() *mcpserver.Registry
Constants ¶
View Source
const ( SkillListTool = "skills/list" SkillGetTool = "skills/get" )
View Source
const DefaultResourceBaseURI = "datly://localhost"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶ added in v1.0.0
type Catalog struct {
// contains filtered or unexported fields
}
func (*Catalog) ResourceCatalog ¶ added in v1.0.0
func (c *Catalog) ResourceCatalog() *mcpresource.Catalog
type ComponentLoader ¶ added in v1.0.0
type ComponentRouteResolver ¶ added in v1.0.0
type Config ¶ added in v1.0.0
type Config struct {
Folders []mcpresource.Folder
Components []*registry.RegisteredComponent
Invoker exec.ComponentInvoker
Client xmcp.Client
Resources *bindresource.Store
ResourceBaseURI string
Authorization *authorization.Policy
AuthorizeTool func(context.Context, exec.ComponentTarget) error
AuthorizeResource func(context.Context, string) error
// Indexed publishes tool identities without eager component contracts.
Indexed []*spec.Component
Loader ComponentLoader
}
type Service ¶ added in v1.0.0
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Authorization ¶ added in v1.0.0
func (s *Service) Authorization() *authorization.Policy
Authorization returns a detached copy of the validated transport policy.
func (*Service) PrepareTool ¶ added in v1.0.0
func (*Service) PrepareTools ¶ added in v1.0.0
func (*Service) ReadResource ¶ added in v1.0.0
func (s *Service) ReadResource(ctx context.Context, request *schema.ReadResourceRequest) (*schema.ReadResourceResult, *jsonrpc.Error)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package developer exposes explicitly configured authoring tools separately from Datly's business component catalog and runtime invocation engine.
|
Package developer exposes explicitly configured authoring tools separately from Datly's business component catalog and runtime invocation engine. |
|
skills
Package skills contains the complete canonical authoring skill snapshot.
|
Package skills contains the complete canonical authoring skill snapshot. |
|
Package input projects compiled MCP payloads into canonical Bindly request providers.
|
Package input projects compiled MCP payloads into canonical Bindly request providers. |
|
Package invocation adapts MCP calls to the protocol-neutral component port.
|
Package invocation adapts MCP calls to the protocol-neutral component port. |
|
Package resource compiles and resolves MCP resource route exposures.
|
Package resource compiles and resolves MCP resource route exposures. |
|
Package server adapts a compiled Datly MCP service to the upstream protocol handler.
|
Package server adapts a compiled Datly MCP service to the upstream protocol handler. |
|
Package tool compiles route-effective component contracts into MCP tools.
|
Package tool compiles route-effective component contracts into MCP tools. |
Click to show internal directories.
Click to hide internal directories.