Tips for getting the most out of Foundry
Start with the narrowest scopes
.readonly variants until you actually need to write.Point the docs URL at the API reference
developers.google.com.Use one integration per real-world tool
Test in development before publishing
Give your function a precise description
Chat your way to better code
Iterate small
Use Configure to keep agent prompts fresh
Troubleshooting
Find your symptom, expand it for the fix.OAuth setup
Google returns "redirect_uri_mismatch"
Google returns "redirect_uri_mismatch"
http vs https matter.The OAuth flow succeeds but the function gets 401s
The OAuth flow succeeds but the function gets 401s
Tokens stop working after an hour
Tokens stop working after an hour
access_type=offline and prompt=consent are set in the authorization URL parameters. Without them, Google doesn’t issue a refresh token and access expires when the access token does. See the Google walkthrough for the exact JSON.A refresh token expired and functions started failing
A refresh token expired and functions started failing
A user disconnected and now functions fail for them
A user disconnected and now functions fail for them
Docs research
Research fails or returns nothing useful
Research fails or returns nothing useful
Research finishes but generated code uses the wrong endpoints
Research finishes but generated code uses the wrong endpoints
Generation and testing
Generation status is stuck on Error
Generation status is stuck on Error
Test runs return data, but workflows show no output
Test runs return data, but workflows show no output
{ id, status }, rather than a string. Workflows can only map fields off objects.The function works in development but fails in production
The function works in development but fails in production
ctx.env gives the function a way to branch. The integration itself still needs to reach the production API.Publishing
Publish fails on validation
Publish fails on validation
Agents don't seem to know about a function I just published
Agents don't seem to know about a function I just published