Browse topics
RobinPath Overview
Projects API
Read project metadata from your custom resource.
Projects API
The Projects API provides read-only access to project metadata. Use it to list all projects or get the project that owns the current resource.
Capability required: projects:read
Frontend (iframe)
import { createResourceClient } from "@rightplace/sdk";
const rp = createResourceClient();
await rp.ready();
// Get the project that owns this resource
const current = await rp.projects.getCurrent();
// -> { id: "abc123", name: "My Site", icon: "globe", color: "#3b82f6" }
// List all projects
const all = await rp.projects.list();
// -> [{ id: "abc123", name: "My Site", ... }, { id: "def456", name: "Blog", ... }]
Backend (Node.js)
import { createResourceServer } from "@rightplace/sdk/server";
const server = createResourceServer({
methods: {
getProjectInfo: async (_params, { rp }) => {
const project = await rp.projects.getCurrent();
return { projectName: project.name };
},
listAllProjects: async (_params, { rp }) => {
return await rp.projects.list();
},
},
});
server.start();
MCP
Full read/write project management is available to agents:
| Tool | Purpose | Permission |
|---|---|---|
rightplace_list_projects | List every project | projects:read |
rightplace_get_project | One project with its resources | projects:read |
rightplace_create_project | New project | projects:write |
rightplace_update_project | Update name / description / icon / color | projects:write |
{
"name": "rightplace_create_project",
"arguments": { "name": "Q2 Launch", "icon": "rocket", "color": "#ef4444" }
}
RobinPath Bridge
# List
rightplace.list_projects into $projects
for $p in $projects
log $p.id $p.name
endfor
# Get current project (the one that owns the running script / active place)
rightplace.context into $ctx
log "current project:" $ctx.project.name
# Get one with its resource list
rightplace.get_project {id: "proj_abc"} into $project
for $r in $project.resources
log $r.id $r.name $r.type
endfor
# Create + update
rightplace.create_project {name: "Q2 Launch", icon: "rocket", color: "#ef4444"} into $created
rightplace.update_project {id: $created.id, name: "Q2 Launch 🚀"}
API Reference
rp.projects.getCurrent()
Returns the project that owns the current resource.
| Parameter | Type | Description |
|---|---|---|
| Returns | Promise<ProjectInfo> | The owning project |
rp.projects.list()
Returns all projects in the workspace.
| Parameter | Type | Description |
|---|---|---|
| Returns | Promise<ProjectInfo[]> | All projects |
ProjectInfo
| Field | Type | Description |
|---|---|---|
id | string | Project ID |
name | string | Project name |
icon | string | null | Icon identifier |
color | string | null | Header color (hex) |
Manifest Configuration
{
"capabilities": [
"projects:read"
]
}
Notes
- This API is read-only. Resources cannot create, update, or delete projects.
- The
folderPathis not exposed for security reasons. Use the Project Filesystem API to access project files.