Investigate a resource’s cost
Name the resource and the period you want to investigate. Include its namespace, cluster, or provider when another resource could have the same name. Your agent usessearchContextGraph to find the resource, then readContextGraph
to inspect it. The result shows its cost basis, related resources, usage, and
available findings. Ask the agent to follow a connection when you need to
investigate a dependency.
An allocated cost is a share of another resource’s bill. Do not add it to that
resource’s billed cost as a separate charge. A missing connection can mean the
necessary inventory or network data is not connected. Refer to
Context for the data each source adds.
Find Kubernetes rightsizing recommendations
Ask for recommendations with enough detail to assess each one. Your agent usesk8sRecommendations for workload requests. The following table
shows an illustrative summary.
Review the recommendation’s usage data and the workload’s requirements before
requesting a change.
Recommendations can also call for more capacity. A negative monthly saving means
the proposed change increases cost. For VM, disk, and persistent-volume
recommendations, your agent uses
readRecommendations instead.
Turn a recommendation into a change
Ask the agent to investigate the recommendation and hand the change to a workflow. CostGraph’sstartWorkflowRun tool hands the task to a workflow. Changes follow
the goal’s approval settings. Open the run to inspect its plan, steps, and outcome.
You can ask the agent to check progress with getWorkflowRun or send a follow-up
with continueWorkflowRun.
If your connection cannot start a workflow, CostGraph returns a dashboard link
instead. No run starts from that request. Use the link to continue in CostGraph
with the required access.
Refer to Start workflows from MCP for the
workflow setup and approval behavior.
Run code in a sandbox
Ask the agent to run a computation in a sandbox on one of your connected sandbox providers. Your agent works through the following tools.
Without a named provider, AutoPilot for sandboxes chooses the provider and tries
the next one when a start fails. Ask for a size, a policy, or a provider in your
prompt to change the choice. The agent can also add tags, such as
run, to group
the sandbox’s cost. Refer to
How a provider is chosen.
A command runs for at most 55 seconds. For longer work, ask the agent to start
the command in the background and check on it later.
A sandbox bills your provider account from the moment it starts until it ends.
Ask the agent to delete each sandbox when the work is done. To find sandboxes
left running, ask the following.
listSandboxes shows only sandboxes started through these tools or the
sandbox API. For work that needs
GitHub or another connected service, start a workflow instead, as described in
Turn a recommendation into a change.
Price out an instance swap
Include the provider, region, and workload requirements in your comparison. Your agent usesreadPricingApi to compare prices. Check architecture, operating
system, purchase model, and usage assumptions before treating a lower price as a
suitable replacement.
Check a budget
Ask for both spend so far and the forecast for the end of the period. ThereadCostGraphBudgets tool returns budget status and forecasts. Refer to
Budgets to create or change a budget.
Check commitment coverage
Ask which commitments cover usage and which remain unused. ThereadCostGraphCommitment tool returns coverage and unused commitment by
provider, service, or commitment. Refer to Commitments.
Find untagged spend
Use a specific ownership key and period to find attribution gaps. ThereadCostGraphAllocation tool returns the allocated share and unallocated
spend. Virtual tags count toward allocation.
Allocation coverage
Review the share of spend assigned to an owner.
Create virtual tags
Add rules for the gaps you found.