update_project
Update an existing project by modifying only the fields you want to change, such as brand name, industry, or country.
Instructions
Update an existing project. Pass only the fields you want to change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ||
| brandName | No | ||
| industry | No | ||
| country | No |
Implementation Reference
- src/tools/projects.js:58-58 (handler)Handler for 'update_project' tool — destructures projectId and remaining fields, then sends a PATCH request to /projects/:id.
handler: async ({ projectId, ...patch }) => api.patch(`/projects/${projectId}`, patch), - src/tools/projects.js:48-57 (schema)Input schema for 'update_project' — accepts projectId (required) plus optional fields: brandName, industry, country.
inputSchema: { type: 'object', properties: { projectId: { type: 'string' }, brandName: { type: 'string' }, industry: { type: 'string' }, country: { type: 'string' }, }, required: ['projectId'], }, - src/tools/projects.js:45-59 (registration)Tool object definition registered in the projectTools array, which is spread into ALL_TOOLS in src/index.js.
{ name: 'update_project', description: 'Update an existing project. Pass only the fields you want to change.', inputSchema: { type: 'object', properties: { projectId: { type: 'string' }, brandName: { type: 'string' }, industry: { type: 'string' }, country: { type: 'string' }, }, required: ['projectId'], }, handler: async ({ projectId, ...patch }) => api.patch(`/projects/${projectId}`, patch), }, - src/index.js:31-41 (registration)ALL_TOOLS array in src/index.js — projectTools (including update_project) are spread into the full tool list.
const ALL_TOOLS = [ ...projectTools, ...keywordTools, ...reportTools, ...quickTestTools, ...keywordResearchTools, ...competitorTools, ...opportunityTools, ]; const toolByName = new Map(ALL_TOOLS.map((t) => [t.name, t])); - src/client.js:81-81 (helper)The api.patch method used by the update_project handler to call the SurfRank API.
patch: (path, body) => request('PATCH', path, { body }),