server

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package server is the Costfluent MCP server: tools over the Public API, each listed only when the API token the server serves carries the capability the tool's call needs, and a tool that creates or changes an object only while the token's organization lets AI agents write.

Index

Constants

View Source
const APIAttemptTimeout = 100 * time.Second

APIAttemptTimeout is how long a server waits for one attempt at a Public API call. The API answers an interactive request for up to 90 seconds, so the SDK's 30-second default abandons cost reads the API would still answer.

View Source
const AgentName = "costfluent-mcp"

AgentName names the tools to the API in every request they make, through costfluent.AgentHeader.

View Source
const AgentWritesSetting = "“Let AI agents create and change objects” under Settings, Organization"

AgentWritesSetting names the organization setting that lets AI agents write, and where an Owner finds it, for an error that says why a write was refused or is not served.

View Source
const NoCapability costfluent.Capability = ""

NoCapability gates a tool that calls no Public API: it reads Costfluent's public documentation, so a token's capabilities widen nothing it returns. Such a tool is served beside the gated ones to every token served at least one, and never on its own.

Variables

This section is empty.

Functions

func Build added in v0.2.0

func Build(client *costfluent.Client, me *costfluent.Me, opts Options) (*mcp.Server, error)

Build returns a server holding the tools me, the token client carries, may call: a read tool when the token carries its capability, a write tool only when the organization lets AI agents write too (Serves), and after them the tools that need no capability, the docs tools. A token no gated tool serves is an error naming the capabilities the read tools need, because an assistant shows no log, and a server holding only the docs would read as a broken Costfluent server. A workspace token's client defaults to its own workspace, so a tool called without a workspace reads the token's.

Every request a tool makes carries costfluent.AgentHeader, reads included, so the API can refuse a write while the organization's setting is off even when it was turned off after the server started, and its audit log names the agent.

func New

func New(ctx context.Context, client *costfluent.Client, version string) (*mcp.Server, *costfluent.Me, error)

New asks the API which token the client carries and returns a server holding the tools that token may call, as Build does. It is how the stdio mode starts: one token for the whole session.

func Serves added in v0.3.0

func Serves(me *costfluent.Me, e CatalogEntry) bool

Serves reports whether a token me describes is served the tool e: it carries the tool's capability and, for a tool that writes, its organization lets AI agents create and change objects. A tool that needs no capability is served beside any tool that does (ToolNames), never alone.

func ToolError added in v0.3.0

func ToolError(err error) error

ToolError is a failed call as the client reads it: the API's ApiError when the API refused the call, otherwise the error's text. Neither carries the token, which travels only in a request header.

func ToolNames

func ToolNames(me *costfluent.Me) []string

ToolNames lists the tools a token me describes is served, in registration order: none when no gated tool serves it, as Build then serves nothing.

Types

type AcknowledgeAnomalyInput added in v0.3.0

type AcknowledgeAnomalyInput struct {
	AnomalyID string `json:"anomaly_id" jsonschema:"the anomaly to acknowledge, as list_anomalies names it"`
}

type AddDashboardWidgetInput added in v0.3.0

type AddDashboardWidgetInput struct {
	DashboardID string `json:"dashboard_id" jsonschema:"the dashboard to add the widget to"`
	WorkspaceArg
	Title        string `json:"title" jsonschema:"the widget's title"`
	Type         string `json:"type,omitempty" jsonschema:"costReport (the default) for a saved report, or text"`
	CostReportID string `json:"cost_report_id,omitempty" jsonschema:"the saved report a costReport widget draws, as list_cost_reports names it"`
	Display      string `json:"display,omitempty" jsonschema:"how a costReport widget draws its report: chart, table or kpi"`
	Content      string `json:"content,omitempty" jsonschema:"a text widget's words, at most 10,000 characters"`
	Column       *int   `json:"column,omitempty" jsonschema:"the widget's first column, from 0 of the dashboard's 12"`
	Row          *int   `json:"row,omitempty" jsonschema:"the widget's first row, from 0"`
	Width        *int   `json:"width,omitempty" jsonschema:"the widget's width in columns, 1 to 12"`
	Height       *int   `json:"height,omitempty" jsonschema:"the widget's height in rows"`
}

type AssignSavingsItemOwnerInput added in v0.3.0

type AssignSavingsItemOwnerInput struct {
	SavingsItemID string `json:"savings_item_id" jsonschema:"the finding, as list_savings_items names it"`
	WorkspaceArg
	Owner string `json:"owner" jsonschema:"who acts on the finding, free text such as a team or a person, at most 200 characters"`
}

type BudgetGridInput added in v0.7.1

type BudgetGridInput struct {
	BudgetID  string `json:"budget_id" jsonschema:"the budget's ID, as list_budgets names it"`
	From      string `json:"from,omitempty" jsonschema:"a day, YYYY-MM-DD, in the first period; omitted is six periods back"`
	Periods   int    `json:"periods,omitempty" jsonschema:"periods to show, 1 to 12; omitted is 12"`
	VersionID string `json:"version_id,omitempty" jsonschema:"a saved version's ID, as list_budgets names it; omitted is the live amounts"`
	WorkspaceArg
}

type CatalogEntry added in v0.3.0

type CatalogEntry struct {
	Name       string
	Capability costfluent.Capability
	Writes     bool
}

CatalogEntry names a tool, the capability its call needs and whether it creates or changes Costfluent objects, which only an organization that lets AI agents write is served.

func Catalog added in v0.3.0

func Catalog() []CatalogEntry

Catalog lists every tool the registry holds with the capability its call needs, in registration order, whatever a token carries: what a front-end that builds its own surface from the tools, such as the CLI's help, reads without asking the API.

type Changed added in v0.3.0

type Changed struct {
	ID     string `json:"id"`
	Status string `json:"status"`
}

Changed is what a write that answers with no object did.

type CommitmentCoverageInput added in v0.2.0

type CommitmentCoverageInput struct {
	RequiredDates
	WorkspaceArg
	Granularity string `json:"granularity,omitempty" jsonschema:"the period of each bin: day, week, month or quarter; month when omitted"`
	FilterArg
}

type CostAlertConditionArgs added in v0.7.1

type CostAlertConditionArgs struct {
	RollingDays   *int     `json:"rolling_days,omitempty" jsonschema:"condition: settled days, 1 to 90; or to_date"`
	ToDate        string   `json:"to_date,omitempty" jsonschema:"condition: week, month or quarter; or rolling_days"`
	Weekdays      []string `json:"weekdays,omitempty" jsonschema:"condition: days summed, such as saturday"`
	Compare       string   `json:"compare,omitempty" jsonschema:"condition: none, shiftDays, previousPeriod or filter"`
	ShiftDays     *int     `json:"shift_days,omitempty" jsonschema:"condition: 1 to 365, with shiftDays"`
	CompareFilter string   `json:"compare_filter,omitempty" jsonschema:"condition: CQL, with filter"`
	Direction     string   `json:"direction,omitempty" jsonschema:"condition: rise, drop or either"`
	By            string   `json:"by,omitempty" jsonschema:"condition: amount or percent"`
	Measure       string   `json:"measure,omitempty" jsonschema:"condition: cost or commitmentCoverage"`
}

CostAlertConditionArgs are a condition alert's condition, flat, because the CLI gives each tool argument a flag and an object argument has no flag form. Any of them given sends the condition.

type CostAlertInput added in v0.3.0

type CostAlertInput struct {
	CostAlertID string `json:"cost_alert_id" jsonschema:"the cost alert"`
	WorkspaceArg
}

type CostReportDataInput

type CostReportDataInput struct {
	CostReportID string `json:"cost_report_id" jsonschema:"the saved report's ID, as list_cost_reports names it"`
	WorkspaceArg
}

type CostReportResult added in v0.3.0

type CostReportResult struct {
	costfluent.CostReportData
	SeriesOmittedPeriods int    `json:"series_omitted_periods,omitempty"`
	SeriesFrom           string `json:"series_from,omitempty"`
}

CostReportResult is what a saved report shows. When it would encode past maxReportBytes, the series, comparison, unit cost and forecast keep only their points dated from SeriesFrom on, and SeriesOmittedPeriods counts the dates left out. The summary, breakdown and names stay whole, so when they alone pass maxReportBytes the answer keeps the latest date only and is larger still.

type CostReportSQLInput added in v0.7.1

type CostReportSQLInput struct {
	CostReportID string `json:"cost_report_id" jsonschema:"the saved report's ID, as list_cost_reports names it"`
	Dialect      string `json:"dialect" jsonschema:"the engine: bigquery, snowflake, athena, duckdb or clickhouse"`
	WorkspaceArg
}

type CostReportSnapshots added in v0.7.1

type CostReportSnapshots struct {
	Months   []costfluent.CostReportMonthSnapshotSummary `json:"months,omitempty"`
	Snapshot *costfluent.CostReportMonthSnapshot         `json:"snapshot,omitempty"`
}

CostReportSnapshots is a report's recorded months, or the one month asked for.

type CostReportSnapshotsInput added in v0.7.1

type CostReportSnapshotsInput struct {
	CostReportID string `json:"cost_report_id" jsonschema:"the saved report's ID, as list_cost_reports names it"`
	Month        string `json:"month,omitempty" jsonschema:"one recorded month, yyyy-MM; omitted lists them"`
	WorkspaceArg
}

type CostReports

type CostReports struct {
	Reports  []costfluent.CostReport `json:"reports"`
	NextPage int                     `json:"next_page,omitempty"`
}

CostReports is one page of a workspace's saved cost reports. NextPage is the page to ask for next, absent on the last. It keeps the reports key it had before it paged, so a reader of one answer per workspace still reads it.

type CostsResult

type CostsResult struct {
	Rows     []costfluent.CostDataPoint `json:"rows"`
	Meta     costfluent.CostDataMeta    `json:"meta"`
	NextPage int                        `json:"next_page,omitempty"`
}

CostsResult is one page of cost rows and what the query covered.

type CreateAnnotationInput added in v0.3.0

type CreateAnnotationInput struct {
	WorkspaceArg
	Date           string   `json:"date,omitempty" jsonschema:"the day the note stands on, YYYY-MM-DD"`
	Text           string   `json:"text" jsonschema:"the note, at most 1,000 characters"`
	CostReportIDs  []string `` /* 127-byte string literal not displayed */
	WholeWorkspace bool     `json:"whole_workspace,omitempty" jsonschema:"true to pin the note to every report, naming none"`
	Tags           []string `json:"tags,omitempty" jsonschema:"up to ten tags"`
	URL            string   `json:"url,omitempty" jsonschema:"an https link, such as the pipeline run"`
	Context        []string `json:"context,omitempty" jsonschema:"up to ten key=value pairs, such as commit=3f2a9c1"`
	OccurredAt     string   `json:"occurred_at,omitempty" jsonschema:"when it happened, RFC 3339, such as 2026-11-20T14:30:00Z"`
	AppliesTo      string   `` /* 148-byte string literal not displayed */
}

type CreateBudgetInput added in v0.3.0

type CreateBudgetInput struct {
	WorkspaceArg
	Name     string `json:"name" jsonschema:"the budget's name"`
	Currency string `json:"currency" jsonschema:"the budget's ISO 4217 currency, such as USD"`
	Amount   string `json:"amount" jsonschema:"every period's amount, a decimal, such as 5000 or 1250.50"`
	// The first period's first day, worded as Dates words every start_date; the tool's description
	// says what it is here.
	StartDate       string   `json:"start_date,omitempty" jsonschema:"the first day, YYYY-MM-DD"`
	IntervalCount   int      `json:"interval_count,omitempty" jsonschema:"how many interval units a period lasts; 1 when omitted"`
	IntervalUnit    string   `json:"interval_unit,omitempty" jsonschema:"day, week, month or year; month when omitted, so a quarter is 3 months"`
	Measure         string   `json:"measure,omitempty" jsonschema:"cost (the default) or usage, which counts usage_unit on cost_report_id's rows"`
	UsageUnit       string   `json:"usage_unit,omitempty" jsonschema:"the one usage unit a usage budget counts, such as Tokens"`
	CostReportID    string   `` /* 185-byte string literal not displayed */
	SegmentID       string   `json:"segment_id,omitempty" jsonschema:"the allocation segment whose costs the budget measures"`
	AlertThresholds []string `` /* 300-byte string literal not displayed */
	AppIDs          []string `json:"app_ids,omitempty" jsonschema:"the notification channels every threshold notifies"`
}

type CreateCostAlertInput added in v0.3.0

type CreateCostAlertInput struct {
	WorkspaceArg
	Name             string   `json:"name" jsonschema:"the alert's name"`
	ThresholdType    string   `` /* 180-byte string literal not displayed */
	ThresholdValue   string   `json:"threshold_value" jsonschema:"a decimal: an amount or a percent"`
	ComparisonPeriod string   `json:"comparison_period,omitempty" jsonschema:"previousDay, previousWeek, previousMonth, sameDayLastMonth or previousQuarter"`
	MinimumAmount    string   `json:"minimum_amount,omitempty" jsonschema:"the smallest increase a percent change must reach, a decimal"`
	ProviderIDs      []string `json:"provider_ids,omitempty" jsonschema:"the connections (prv_...) watched; every one when omitted"`
	FilterArg
	AppIDs                     []string `json:"app_ids,omitempty" jsonschema:"the channels it notifies"`
	EvaluationFrequencyMinutes *int     `json:"evaluation_frequency_minutes,omitempty" jsonschema:"minutes between evaluations; 60 when omitted"`
	CostAlertConditionArgs
	GroupingArgs
	Severity string `json:"severity,omitempty" jsonschema:"info, warning or critical"`
}

type CreateCostReportInput added in v0.3.0

type CreateCostReportInput struct {
	WorkspaceArg
	Title string `json:"title" jsonschema:"the report's title"`
	ReportFields
}

type CreateDashboardInput added in v0.3.0

type CreateDashboardInput struct {
	WorkspaceArg
	Title string `json:"title" jsonschema:"the dashboard's title"`
	DateRange
	DateBin string `json:"date_bin,omitempty" jsonschema:"day, week, month, quarter or cumulative"`
}

type DateRange added in v0.7.1

type DateRange struct {
	DateInterval string `json:"date_interval,omitempty" jsonschema:"the window by name, as the description lists"`
	Dates
}

DateRange is a window named by date_interval, or custom between its dates.

type Dates added in v0.7.1

type Dates struct {
	StartDate string `json:"start_date,omitempty" jsonschema:"the first day, YYYY-MM-DD"`
	EndDate   string `json:"end_date,omitempty" jsonschema:"the last day, inclusive, YYYY-MM-DD"`
}

Dates is an optional range of days.

type FilterArg added in v0.7.1

type FilterArg struct {
	Filter string `` /* 131-byte string literal not displayed */
}

FilterArg is the cost filter a tool narrows its costs by.

type GetDocPageInput added in v0.3.0

type GetDocPageInput struct {
	URL string `` /* 218-byte string literal not displayed */
}

type GetSkillInput added in v0.7.1

type GetSkillInput struct {
	Skill string `json:"skill" jsonschema:"the skill's name, as list_skills names it, such as check-budget or recipes"`
	File  string `` /* 149-byte string literal not displayed */
}

GetSkillInput names a skill and one of its files.

type GetSkillResult added in v0.7.1

type GetSkillResult struct {
	Skill   string `json:"skill"`
	File    string `json:"file"`
	Content string `json:"content" jsonschema:"the file's markdown"`
}

GetSkillResult is one file of a skill.

type GroupingArgs added in v0.7.1

type GroupingArgs struct {
	GroupBy []string `` /* 156-byte string literal not displayed */
}

GroupingArgs are the slots a tool breaks costs down by.

type KubernetesEfficiencyInput added in v0.2.0

type KubernetesEfficiencyInput struct {
	RequiredDates
	Level string `json:"level" jsonschema:"what each row is: cluster, namespace or workload"`
	WorkspaceArg
	FilterArg
}

type ListAnnotationsInput added in v0.2.0

type ListAnnotationsInput struct {
	WorkspaceArg
	CostReportID string `` /* 126-byte string literal not displayed */
	Dates
	IncludeResolved bool     `json:"include_resolved,omitempty" jsonschema:"true to list resolved annotations too; open ones only when omitted"`
	Text            string   `json:"text,omitempty" jsonschema:"only annotations whose text or firing's name holds this"`
	Sources         []string `json:"sources,omitempty" jsonschema:"manual, budgetAlert or costAlert"`
	Categories      []string `json:"categories,omitempty" jsonschema:"business, technical or provider"`
	Tags            []string `json:"tags,omitempty" jsonschema:"only notes carrying any of these tags"`
	PageArg
}

type ListAnomaliesInput

type ListAnomaliesInput struct {
	Dates
	Severity           string `json:"severity,omitempty" jsonschema:"only anomalies of this severity: low, medium, high, critical, in any case"`
	CloudAccountID     string `` /* 209-byte string literal not displayed */
	UnacknowledgedOnly bool   `json:"unacknowledged_only,omitempty" jsonschema:"true for open anomalies only"`
	PageArg
}

type ListBudgetsInput

type ListBudgetsInput struct {
	WorkspaceArg
	PageArg
}

type ListChangeEventsInput added in v0.7.1

type ListChangeEventsInput struct {
	WorkspaceArg
	RequiredDates
	PageArg
}

type ListCommitmentsInput added in v0.2.0

type ListCommitmentsInput struct {
	WorkspaceArg
	Provider      string `json:"provider,omitempty" jsonschema:"only commitments held through this provider, such as aws, azure or gcp"`
	Status        string `json:"status,omitempty" jsonschema:"only commitments in this state: active, expiring, expired or unknown (no end stated)"`
	Type          string `` /* 128-byte string literal not displayed */
	Service       string `json:"service,omitempty" jsonschema:"only commitments for this service, as the provider names it"`
	Account       string `json:"account,omitempty" jsonschema:"only commitments held in this provider account"`
	Region        string `json:"region,omitempty" jsonschema:"only commitments in this region"`
	TermYears     int    `json:"term_years,omitempty" jsonschema:"only commitments of this term in years: 1, 3 or 5"`
	PaymentOption string `json:"payment_option,omitempty" jsonschema:"only commitments paid this way: All Upfront, Partial Upfront or No Upfront"`
	PageArg
}

type ListCostReportsInput added in v0.3.0

type ListCostReportsInput struct {
	WorkspaceArg
	CostReportID string `json:"cost_report_id,omitempty" jsonschema:"only this saved report, read by its ID; page does not apply"`
	PageArg
}

type ListEventsInput added in v0.7.1

type ListEventsInput struct {
	Type        string `json:"type,omitempty" jsonschema:"only this event type, such as budget_alert"`
	WorkspaceID string `json:"in_workspace_id,omitempty" jsonschema:"only this workspace's events"`
	From        string `json:"from,omitempty" jsonschema:"the first instant, included, RFC 3339"`
	To          string `json:"to,omitempty" jsonschema:"the first instant left out, RFC 3339"`
	PageArg
}

type ListSavingsItemsInput added in v0.2.0

type ListSavingsItemsInput struct {
	WorkspaceArg
	SavingsItemID        string `json:"savings_item_id,omitempty" jsonschema:"only this finding, read by its ID; the filters, sort and page do not apply"`
	Tab                  string `` /* 128-byte string literal not displayed */
	Source               string `` /* 187-byte string literal not displayed */
	Kind                 string `` /* 184-byte string literal not displayed */
	CloudAccountID       string `` /* 213-byte string literal not displayed */
	CostEstimateID       string `` /* 264-byte string literal not displayed */
	MinimumMonthlySaving string `` /* 153-byte string literal not displayed */
	Sort                 string `json:"sort,omitempty" jsonschema:"newest (the default) or largestSaving"`
	PageArg
}

type ListSkillsInput added in v0.7.1

type ListSkillsInput struct{}

ListSkillsInput takes nothing: every skill is listed.

type ListSkillsResult added in v0.7.1

type ListSkillsResult struct {
	Skills []skills.Skill `json:"skills"`
}

ListSkillsResult is every skill the server carries.

type ListWorkspacesInput

type ListWorkspacesInput struct {
	PageArg
}

type MarkCostAlertEventExpectedInput added in v0.7.1

type MarkCostAlertEventExpectedInput struct {
	CostAlertID string `json:"cost_alert_id" jsonschema:"the cost alert that fired"`
	EventID     string `json:"event_id" jsonschema:"the firing, an alrt_evt_ id"`
	Note        string `json:"note,omitempty" jsonschema:"why it was expected, up to 1000 characters"`
	WorkspaceArg
}

type Options added in v0.2.0

type Options struct {
	Version string
	// CallTimeout, when positive, ends a tool call still running after it as a tool error.
	CallTimeout time.Duration
	// Hosted answers a call that never reached the API with a generic tool error, because the
	// transport's own text names the upstream's internal address, which a hosted caller has no use for.
	Hosted bool
	// Docs is where the docs tools read the documentation; the process's shared Source when nil.
	Docs *docs.Source
}

Options shape the server Build returns.

type Page

type Page[T any] struct {
	Items    []T `json:"items"`
	NextPage int `json:"next_page,omitempty"`
}

Page is one page of a listing. NextPage is the page to ask for next, absent on the last.

type PageArg added in v0.7.1

type PageArg struct {
	Page int `json:"page,omitempty" jsonschema:"the page to read, from 1"`
}

PageArg is the page of a listing a tool reads.

type QueryCostsInput

type QueryCostsInput struct {
	DateRange
	WorkspaceArg
	Granularity string `` /* 352-byte string literal not displayed */
	GroupingArgs
	FilterArg
	Measure  string `json:"measure,omitempty" jsonschema:"cost, usage (consumed quantity) or count (distinct resources); cost when omitted"`
	Amortize *bool  `` /* 132-byte string literal not displayed */
	PageArg
	Limit int `json:"limit,omitempty" jsonschema:"rows per page, at most 5000; 500 when omitted"`
}

type ReportFields added in v0.3.0

type ReportFields struct {
	ChartType string `json:"chart_type,omitempty" jsonschema:"line, bar, stackedBar, area, pie or table; a new report draws stackedBar"`
	DateBin   string `` /* 165-byte string literal not displayed */
	DateRange
	FilterArg
	GroupingArgs
	FolderID            string `json:"folder_id,omitempty" jsonschema:"the folder to file the report in"`
	Measure             string `json:"measure,omitempty" jsonschema:"what the report counts: cost, usage (consumed quantity) or count (distinct resources)"`
	Amortize            *bool  `json:"amortize,omitempty" jsonschema:"true for effective cost with commitments spread over their term"`
	IncludeCredits      *bool  `json:"include_credits,omitempty" jsonschema:"whether credits count"`
	IncludeRefunds      *bool  `json:"include_refunds,omitempty" jsonschema:"whether refunds count"`
	IncludeTax          *bool  `json:"include_tax,omitempty" jsonschema:"whether tax counts"`
	ShowForecast        *bool  `json:"show_forecast,omitempty" jsonschema:"whether the chart shows a forecast"`
	CompareToLastPeriod *bool  `json:"compare_to_last_period,omitempty" jsonschema:"whether the report compares with the period before"`
}

ReportFields are a cost report's definition as a create or an update takes it. A field left out is the API's default on a create and the report's own on an update.

type RequiredDates added in v0.7.1

type RequiredDates struct {
	StartDate string `json:"start_date" jsonschema:"the first day, YYYY-MM-DD"`
	EndDate   string `json:"end_date" jsonschema:"the last day, inclusive, YYYY-MM-DD"`
}

RequiredDates is a range of days a tool cannot read without.

type SearchDocsInput added in v0.3.0

type SearchDocsInput struct {
	Query    string `` /* 132-byte string literal not displayed */
	Language string `json:"language,omitempty" jsonschema:"the docs' language: en or de; en when omitted"`
	Limit    int    `json:"limit,omitempty" jsonschema:"sections to return: 5 when omitted, at most 10"`
}

type SearchDocsResult added in v0.3.0

type SearchDocsResult struct {
	Results []docs.Hit `json:"results"`
}

SearchDocsResult is the sections that match a query best, best first.

type SetSavingsItemStatusInput added in v0.3.0

type SetSavingsItemStatusInput struct {
	SavingsItemID string `json:"savings_item_id" jsonschema:"the finding, as list_savings_items names it"`
	WorkspaceArg
	Status string `` /* 170-byte string literal not displayed */
	Reason string `` /* 135-byte string literal not displayed */
}

type UpdateBudgetInput added in v0.3.0

type UpdateBudgetInput struct {
	BudgetID           string   `json:"budget_id" jsonschema:"the budget to change, as list_budgets names it"`
	Name               string   `json:"name,omitempty" jsonschema:"the budget's new name"`
	Amount             string   `json:"amount,omitempty" jsonschema:"every period's new amount, a decimal"`
	CostReportID       string   `json:"cost_report_id,omitempty" jsonschema:"move the budget onto this saved report's costs"`
	SegmentID          string   `json:"segment_id,omitempty" jsonschema:"move the budget onto this allocation segment's costs"`
	AddAlertThresholds []string `` /* 335-byte string literal not displayed */
}

type UpdateCostAlertInput added in v0.3.0

type UpdateCostAlertInput struct {
	CostAlertID string `json:"cost_alert_id" jsonschema:"the cost alert to change"`
	WorkspaceArg
	Name             string   `json:"name,omitempty" jsonschema:"the alert's new name"`
	ThresholdType    string   `` /* 190-byte string literal not displayed */
	ThresholdValue   string   `json:"threshold_value,omitempty" jsonschema:"a decimal: an amount or a percent"`
	ComparisonPeriod string   `json:"comparison_period,omitempty" jsonschema:"previousDay, previousWeek, previousMonth, sameDayLastMonth or previousQuarter"`
	MinimumAmount    string   `json:"minimum_amount,omitempty" jsonschema:"the smallest increase a percent change must reach, a decimal; 0 removes it"`
	ProviderIDs      []string `json:"provider_ids,omitempty" jsonschema:"the connections (prv_...) to watch instead, at least one"`
	FilterArg
	AddAppIDs                  []string `json:"add_app_ids,omitempty" jsonschema:"channels added beside its own"`
	EvaluationFrequencyMinutes *int     `json:"evaluation_frequency_minutes,omitempty" jsonschema:"minutes between evaluations"`
	CostAlertConditionArgs
	GroupingArgs
	ClearGroupBy bool   `json:"clear_group_by,omitempty" jsonschema:"removes the grouping"`
	Severity     string `json:"severity,omitempty" jsonschema:"info, warning or critical"`
}

type UpdateCostReportInput added in v0.3.0

type UpdateCostReportInput struct {
	CostReportID string `json:"cost_report_id" jsonschema:"the saved report to change, as list_cost_reports names it"`
	WorkspaceArg
	Title string `json:"title,omitempty" jsonschema:"the report's new title"`
	ReportFields
}

type WorkspaceArg added in v0.7.1

type WorkspaceArg struct {
	WorkspaceID string `json:"workspace_id,omitempty" jsonschema:"the workspace; a workspace token's own when omitted"`
}

WorkspaceArg is the workspace a workspace-scoped tool reads or changes.

Jump to

Keyboard shortcuts

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