{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Updates a Copilot Space owned by an organization. The authenticated user must have permissions to update spaces in the organization.\n\nOrganization members with appropriate permissions can update Copilot Spaces owned by their organization.\n\nOAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.\n\nFine-grained tokens and GitHub App user access tokens must have been granted access to the organization that owns the space. They must also have been granted access to every repository referenced by resources in the space, including any being added or updated.","properties":{"path":{"type":"object","properties":{"org":{"type":"string","description":"The organization name. The name is not case sensitive."},"space_number":{"type":"integer","description":"The unique identifier of the Copilot Space."}},"required":["org","space_number"],"additionalProperties":false},"body":{"type":"object","properties":{"name":{"type":"string","description":"The name of the Copilot Space.","examples":["Updated Team Planning Space"]},"description":{"type":"string","description":"A description of the Copilot Space.","examples":["Updated organization space for team planning and coordination"]},"general_instructions":{"type":"string","maxLength":4000,"description":"General instructions for the Copilot Space.","examples":["Updated instructions to help the team with planning and coordination tasks"]},"base_role":{"type":"string","enum":["reader","writer","admin","no_access"],"description":"The base role that determines default permissions for organization members. Changing this field requires admin permissions.\n- `no_access`: No default access (default)\n- `reader`: Organization members can read the space\n- `writer`: Organization members can read and edit the space\n- `admin`: Organization members have full admin access to the space"},"resources_attributes":{"type":"array","description":"Resources to attach to the space.","items":{"type":"object","properties":{"resource_type":{"type":"string","enum":["repository","github_file","free_text","github_issue","github_pull_request","media_content","uploaded_text_file"],"description":"The type of resource."},"metadata":{"type":"object","description":"Metadata specific to the resource type.","properties":{"repository_id":{"type":"integer","description":"Repository ID for repository or file resources."},"file_path":{"type":"string","description":"File path for file resources."},"text":{"type":"string","description":"Text content for free text resources."},"name":{"type":"string","description":"Name for the resource."},"number":{"type":"integer","description":"Issue or PR number."}}}}}}},"examples":[{"name":"Updated Team Planning Space","description":"Updated organization space for team planning and coordination","general_instructions":"Updated instructions to help the team with planning and coordination tasks","resources_attributes":[{"resource_type":"github_file","metadata":{"repository_id":123456,"file_path":"docs/updated-planning.md"}},{"id":789,"_destroy":true},{"id":456,"resource_type":"free_text","metadata":{"name":"Updated Team Guidelines","text":"Our updated team follows agile methodology and holds daily standups"}}]}]}},"required":["path","body"],"additionalProperties":false},"name":"Set an organization Copilot Space","id":"github.copilot-spaces.update-for-org","example":{"path":{"org":"example","space_number":1},"body":{"name":"Updated Team Planning Space","description":"Updated organization space for team planning and coordination","general_instructions":"Updated instructions to help the team with planning and coordination tasks","resources_attributes":[{"resource_type":"github_file","metadata":{"repository_id":123456,"file_path":"docs/updated-planning.md"}},{"id":789,"_destroy":true},{"id":456,"resource_type":"free_text","metadata":{"name":"Updated Team Guidelines","text":"Our updated team follows agile methodology and holds daily standups"}}]}},"maxRequests":1,"summary":false}}