tools

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TextResult

func TextResult(text string) *mcp.CallToolResult

TextResult wraps a plain string as an MCP text result.

func ToRawResult

func ToRawResult(resp *shared.APIResponse, apiErr error) (*mcp.CallToolResult, any, error)

ToRawResult returns the raw response payload as an MCP text result. Use this for API endpoints that return non-JSON content (e.g. zone files).

func ToResult

func ToResult(data any, apiErr error) (*mcp.CallToolResult, any, error)

ToResult marshals an API response into an MCP text result.

func ValidateDate

func ValidateDate(date string) error

ValidateDate checks that date is a valid YYYY-MM-DD string (e.g. "2026-04-15"). Leading/trailing whitespace is trimmed before parsing.

func ValidatePeriod

func ValidatePeriod(period string) error

ValidatePeriod checks that period is a valid YYYY-MM string (e.g. "2026-04"). Leading/trailing whitespace is trimmed before parsing.

Types

type AccessKeyIDInput

type AccessKeyIDInput struct {
	AccessKeyID string `json:"access_key_id" jsonschema:"the ID of the object storage access key"`
}

type ActivityLogQueryInput

type ActivityLogQueryInput struct {
	Contract             int32    `` /* 186-byte string literal not displayed */
	DateStart            *string  `json:"date_start,omitempty" jsonschema:"inclusive start date YYYY-MM-DD; defaults to 7 days ago when omitted"`
	DateEnd              *string  `` /* 126-byte string literal not displayed */
	Offset               *int32   `json:"offset,omitempty" jsonschema:"0-based pagination offset"`
	Limit                *int32   `` /* 131-byte string literal not displayed */
	User                 *string  `` /* 169-byte string literal not displayed */
	EventTypes           []string `` /* 199-byte string literal not displayed */
	IncludeStatusUpdates *bool    `` /* 198-byte string literal not displayed */
}

type ApplicationLoadBalancerIDInput

type ApplicationLoadBalancerIDInput struct {
	DatacenterID              string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ApplicationLoadBalancerID string `json:"application_loadbalancer_id" jsonschema:"the ID of the application load balancer"`
	Depth                     *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type AutoCertificateIDInput

type AutoCertificateIDInput struct {
	AutoCertificateID string `json:"auto_certificate_id" jsonschema:"the ID of the auto-certificate"`
}

type BillingContractInput

type BillingContractInput struct {
	Contract int32 `json:"contract" jsonschema:"contract number from get_billing_profile"`
}

type BillingContractPeriodInput

type BillingContractPeriodInput struct {
	Contract int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Period   string `` /* 146-byte string literal not displayed */
}

type BillingDatacenterInput

type BillingDatacenterInput struct {
	Contract     int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	DatacenterID string `json:"datacenter_id" jsonschema:"the VDC UUID"`
}

type BillingDateInput

type BillingDateInput struct {
	Contract int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Date     string `json:"date" jsonschema:"date in YYYY-MM-DD format (e.g. 2026-04-15)"`
}

type BillingInvoiceIDInput

type BillingInvoiceIDInput struct {
	Contract  int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	InvoiceID string `json:"invoice_id" jsonschema:"the invoice ID (e.g. GY00111111)"`
}

type BillingPeriodOnlyInput

type BillingPeriodOnlyInput struct {
	Period string `json:"period" jsonschema:"billing period in YYYY-MM format (e.g. 2026-04)"`
}

type BillingProductsInput

type BillingProductsInput struct {
	Contract int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Filter   string `` /* 160-byte string literal not displayed */
}

type BillingUsageDatacenterInput

type BillingUsageDatacenterInput struct {
	Contract     int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	DatacenterID string `json:"datacenter_id" jsonschema:"the VDC UUID"`
	IncludeZero  *bool  `json:"include_zero,omitempty" jsonschema:"include meters with quantity 0 (default false)"`
}

type BillingUsageInput

type BillingUsageInput struct {
	Contract     int32   `json:"contract" jsonschema:"contract number from get_billing_profile"`
	IncludeZero  *bool   `` /* 157-byte string literal not displayed */
	DatacenterID *string `json:"datacenter_id,omitempty" jsonschema:"scope to a single datacenter (VDC UUID)"`
}

BillingUsageInput is the input for list_billing_usage. UsageMeter has fewer fields than UtilizationMeter — type/region/resource filters do not apply.

type BillingUtilizationDateInput

type BillingUtilizationDateInput struct {
	Contract     int32    `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Date         string   `json:"date" jsonschema:"date in YYYY-MM-DD format (e.g. 2026-04-15)"`
	IncludeZero  *bool    `json:"include_zero,omitempty" jsonschema:"include meters with quantity 0 (default false)"`
	GroupBy      *string  `` /* 178-byte string literal not displayed */
	DatacenterID *string  `json:"datacenter_id,omitempty" jsonschema:"scope to a single datacenter (VDC UUID)"`
	MeterTypes   []string `json:"meter_types,omitempty" jsonschema:"filter to these meter type categories only (client-side); e.g. ['DBAAS']"`
	Regions      []string `json:"regions,omitempty" jsonschema:"filter to these regions only (client-side); e.g. ['de/fra']"`
	TopN         *int32   `` /* 215-byte string literal not displayed */
}

type BillingUtilizationInput

type BillingUtilizationInput struct {
	Contract     int32    `json:"contract" jsonschema:"contract number from get_billing_profile"`
	IncludeZero  *bool    `` /* 160-byte string literal not displayed */
	GroupBy      *string  `` /* 230-byte string literal not displayed */
	DatacenterID *string  `json:"datacenter_id,omitempty" jsonschema:"scope to a single datacenter (VDC UUID)"`
	MeterTypes   []string `` /* 129-byte string literal not displayed */
	Regions      []string `json:"regions,omitempty" jsonschema:"filter to these regions only (client-side); e.g. ['de/fra','es/vit']"`
	TopN         *int32   `` /* 373-byte string literal not displayed */
}

BillingUtilizationInput is the input for list_billing_utilization. Compaction flags reduce response size — zero-quantity meters are dropped by default.

type BillingUtilizationPeriodInput

type BillingUtilizationPeriodInput struct {
	Contract     int32    `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Period       string   `` /* 146-byte string literal not displayed */
	IncludeZero  *bool    `json:"include_zero,omitempty" jsonschema:"include meters with quantity 0 (default false)"`
	GroupBy      *string  `` /* 178-byte string literal not displayed */
	DatacenterID *string  `json:"datacenter_id,omitempty" jsonschema:"scope to a single datacenter (VDC UUID)"`
	MeterTypes   []string `` /* 129-byte string literal not displayed */
	Regions      []string `json:"regions,omitempty" jsonschema:"filter to these regions only (client-side); e.g. ['de/fra']"`
	TopN         *int32   `` /* 215-byte string literal not displayed */
}

type CallToolInput added in v1.0.1

type CallToolInput struct {
	Name      string         `json:"name" jsonschema:"the exact name of the tool to invoke (from ionos_search_tools)"`
	Arguments map[string]any `json:"arguments,omitempty" jsonschema:"the tool's arguments as a JSON object; see ionos_describe_tools for the schema"`
}

type CertificateIDInput

type CertificateIDInput struct {
	CertificateID string `json:"certificate_id" jsonschema:"the ID of the certificate"`
}

type DatacenterIDInput

type DatacenterIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type DescribeToolsInput added in v1.0.1

type DescribeToolsInput struct {
	Names []string `` /* 126-byte string literal not displayed */
}

type FirewallRuleIDInput

type FirewallRuleIDInput struct {
	DatacenterID   string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID       string `json:"server_id" jsonschema:"the ID of the server"`
	NicID          string `json:"nic_id" jsonschema:"the ID of the network interface"`
	FirewallRuleID string `json:"firewallrule_id" jsonschema:"the ID of the firewall rule"`
	Depth          *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type GetContractInput added in v1.0.1

type GetContractInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

GetContractInput is the input for get_contract (no required ID fields).

type GpuIDInput

type GpuIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server"`
	GpuID        string `json:"gpu_id" jsonschema:"the ID of the GPU"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type IpBlockIDInput

type IpBlockIDInput struct {
	IpBlockID string `json:"ipblock_id" jsonschema:"the ID of the IP block"`
	Depth     *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type K8sClusterIDInput added in v1.0.1

type K8sClusterIDInput struct {
	K8sClusterID string `json:"k8s_cluster_id" jsonschema:"the ID of the Kubernetes cluster"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type K8sNodeIDInput added in v1.0.1

type K8sNodeIDInput struct {
	K8sClusterID string `json:"k8s_cluster_id" jsonschema:"the ID of the Kubernetes cluster"`
	NodepoolID   string `json:"nodepool_id" jsonschema:"the ID of the Kubernetes node pool"`
	NodeID       string `json:"node_id" jsonschema:"the ID of the Kubernetes node"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type K8sNodepoolIDInput added in v1.0.1

type K8sNodepoolIDInput struct {
	K8sClusterID string `json:"k8s_cluster_id" jsonschema:"the ID of the Kubernetes cluster"`
	NodepoolID   string `json:"nodepool_id" jsonschema:"the ID of the Kubernetes node pool"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type LanIDInput

type LanIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LanID        string `json:"lan_id" jsonschema:"the ID of the LAN"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type ListDatacentersInput added in v1.0.1

type ListDatacentersInput struct {
	Depth *int32 `` /* 131-byte string literal not displayed */
}

ListDatacentersInput is the input for list_datacenters (no required ID fields).

type ListIPBlocksInput added in v1.0.1

type ListIPBlocksInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListImagesInput added in v1.0.1

type ListImagesInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListK8sClustersInput added in v1.0.1

type ListK8sClustersInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListLocationsInput added in v1.0.1

type ListLocationsInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListPrivateCrossConnectsInput added in v1.0.1

type ListPrivateCrossConnectsInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListRequestsInput added in v1.0.1

type ListRequestsInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListSnapshotsInput added in v1.0.1

type ListSnapshotsInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListTargetGroupsInput added in v1.0.1

type ListTargetGroupsInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListTemplatesInput added in v1.0.1

type ListTemplatesInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type LoadBalancerIDInput

type LoadBalancerIDInput struct {
	DatacenterID   string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LoadBalancerID string `json:"loadbalancer_id" jsonschema:"the ID of the load balancer"`
	Depth          *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type NatGatewayIDInput

type NatGatewayIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	NatGatewayID string `json:"nat_gateway_id" jsonschema:"the ID of the NAT gateway"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type NetworkLoadBalancerIDInput

type NetworkLoadBalancerIDInput struct {
	DatacenterID          string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	NetworkLoadBalancerID string `json:"network_loadbalancer_id" jsonschema:"the ID of the network load balancer"`
	Depth                 *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type NicIDInput

type NicIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server"`
	NicID        string `json:"nic_id" jsonschema:"the ID of the network interface"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type ObjectStorageBucketInput

type ObjectStorageBucketInput struct {
	Bucket string `json:"bucket" jsonschema:"the name of the object storage bucket"`
}

type ObjectStorageListObjectVersionsInput

type ObjectStorageListObjectVersionsInput struct {
	Bucket string  `json:"bucket" jsonschema:"the name of the object storage bucket"`
	Prefix *string `json:"prefix,omitempty" jsonschema:"optional key prefix to filter versions"`
}

type ObjectStorageListObjectsInput

type ObjectStorageListObjectsInput struct {
	Bucket            string  `json:"bucket" jsonschema:"the name of the object storage bucket"`
	Prefix            *string `` /* 128-byte string literal not displayed */
	ContinuationToken *string `` /* 140-byte string literal not displayed */
	MaxKeys           *int32  `json:"max_keys,omitempty" jsonschema:"optional maximum number of objects to return in a single page"`
}

type ObjectStorageObjectInput

type ObjectStorageObjectInput struct {
	Bucket string `json:"bucket" jsonschema:"the name of the object storage bucket"`
	Key    string `json:"key" jsonschema:"the object key (path within the bucket)"`
}

type ObjectStorageRegionInput

type ObjectStorageRegionInput struct {
	Region string `json:"region" jsonschema:"the region name (e.g. eu-central-3)"`
}

type PccIDInput

type PccIDInput struct {
	PccID string `json:"pcc_id" jsonschema:"the ID of the private cross-connect"`
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type ProviderIDInput

type ProviderIDInput struct {
	ProviderID string `json:"provider_id" jsonschema:"the ID of the certificate provider"`
}

type RecordIDInput

type RecordIDInput struct {
	ZoneID   string `json:"zone_id" jsonschema:"the ID of the DNS zone"`
	RecordID string `json:"record_id" jsonschema:"the ID of the DNS record"`
}

type RequestIDInput

type RequestIDInput struct {
	RequestID string `json:"request_id" jsonschema:"the ID of the request"`
	Depth     *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type ReverseRecordIDInput

type ReverseRecordIDInput struct {
	ReverseRecordID string `json:"reverse_record_id" jsonschema:"the ID of the reverse DNS record"`
}

type SearchToolsInput added in v1.0.1

type SearchToolsInput struct {
	Query string  `json:"query" jsonschema:"keywords to match against tool names and descriptions; leave empty to browse, optionally with group"`
	Group *string `` /* 146-byte string literal not displayed */
	Limit *int    `` /* 146-byte string literal not displayed */
}

type SecondaryZoneIDInput

type SecondaryZoneIDInput struct {
	SecondaryZoneID string `json:"secondary_zone_id" jsonschema:"the ID of the secondary DNS zone"`
}

type SecurityGroupIDInput

type SecurityGroupIDInput struct {
	DatacenterID    string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	SecurityGroupID string `json:"security_group_id" jsonschema:"the ID of the security group"`
	Depth           *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type SecurityGroupRuleIDInput

type SecurityGroupRuleIDInput struct {
	DatacenterID    string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	SecurityGroupID string `json:"security_group_id" jsonschema:"the ID of the security group"`
	RuleID          string `json:"rule_id" jsonschema:"the ID of the security group rule"`
	Depth           *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type ServerIDInput

type ServerIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type SnapshotIDInput

type SnapshotIDInput struct {
	SnapshotID string `json:"snapshot_id" jsonschema:"the ID of the snapshot"`
	Depth      *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type TargetGroupIDInput

type TargetGroupIDInput struct {
	TargetGroupID string `json:"target_group_id" jsonschema:"the ID of the target group"`
	Depth         *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type TemplateIDInput

type TemplateIDInput struct {
	TemplateID string `json:"template_id" jsonschema:"the ID of the template"`
	Depth      *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type VolumeIDInput

type VolumeIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	VolumeID     string `json:"volume_id" jsonschema:"the ID of the volume"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type ZoneIDInput

type ZoneIDInput struct {
	ZoneID string `json:"zone_id" jsonschema:"the ID of the DNS zone"`
}

Directories

Path Synopsis
Package dynamic implements the 'dynamic' load mode: instead of exposing the full product tool catalog (110+ tools) to the MCP client, the server exposes only three meta-tools — ionos_search_tools, ionos_describe_tools and ionos_call_tool — through which the model discovers and invokes the real tools at runtime.
Package dynamic implements the 'dynamic' load mode: instead of exposing the full product tool catalog (110+ tools) to the MCP client, the server exposes only three meta-tools — ionos_search_tools, ionos_describe_tools and ionos_call_tool — through which the model discovers and invokes the real tools at runtime.
Package ionosclient builds and maintains the User-Agent string the MCP server attaches to outbound IONOS CLOUD API calls.
Package ionosclient builds and maintains the User-Agent string the MCP server attaches to outbound IONOS CLOUD API calls.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL