MCP toolsAccount and sitesUpdated
Change your portfolio
What does mttr_portfolio_set do?
Publishes or hides your portfolio, sets a display name and a home site that says who is behind it, and names each site on it or keeps it to its code. A key may make this call on the sites it has claimed.
When to use it
- You want to share your portfolio, or stop sharing it.
- You want one site on it by its code instead of its name.
What you ask
You say“Publish my portfolio under the name North Studio.”
Your assistant calls
mttr_portfolio_set({ publish: "publish", name: "Hollow Creek Studio", home: "example.com", site: "example.com", shown: "named" })
| Argument | Type | Needed | What it is |
|---|---|---|---|
publish | True or false | No | True to publish, false to hide. |
name | Text | No | A display name, at most 40 characters. |
home | Text | No | One of the person's sites proved by DNS or a file, as a domain. |
site | Text | No | A site in the portfolio, to set how it is shown. |
shown | One of these | No | named, or code for its code on the profile. Give it with site.namedcode |
What comes back
- The portfolio as Your portfolio answers it, with the change made.
| Setting | Now |
|---|---|
| Published | Yes |
| Display name | North Studio |
| Home site | north.example |
| example.com | Named |
Made-up sites and figures, to show the shape of the answer. The answer itself is JSON.
Over HTTP
It is POST /api/v1/portfolio, with your key as a bearer token:
curl -X POST "https://mttr.si/api/v1/portfolio" \
-H "Authorization: Bearer $MTTR_KEY" \
-H "Content-Type: application/json" \
-d '{"publish":"publish","name":"Hollow Creek Studio","home":"example.com","site":"example.com","shown":"named"}'When it fails
| When | Status | What to do |
|---|---|---|
| Your assistant has no key yet | 401 over MCP | Sign up with mttr_signup, then connect again with the key it gives. |
Every error’s wording is in the API reference.
The call in full, with its HTTP address, each argument’s type, who may make it and the call in four languages, is mttr_portfolio_set in the API reference.