Developer

Projects API

Read project metadata from your custom resource.

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:

ToolPurposePermission
rightplace_list_projectsList every projectprojects:read
rightplace_get_projectOne project with its resourcesprojects:read
rightplace_create_projectNew projectprojects:write
rightplace_update_projectUpdate name / description / icon / colorprojects: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.

ParameterTypeDescription
ReturnsPromise<ProjectInfo>The owning project

rp.projects.list()

Returns all projects in the workspace.

ParameterTypeDescription
ReturnsPromise<ProjectInfo[]>All projects

ProjectInfo

FieldTypeDescription
idstringProject ID
namestringProject name
iconstring | nullIcon identifier
colorstring | nullHeader color (hex)

Manifest Configuration

{
  "capabilities": [
    "projects:read"
  ]
}

Notes

  • This API is read-only. Resources cannot create, update, or delete projects.
  • The folderPath is not exposed for security reasons. Use the Project Filesystem API to access project files.