Skip to content

Commit 30e0bb3

Browse files
zimegClaude
andauthored
feat: add slackbot.skills.update method (#2019)
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
1 parent e3125de commit 30e0bb3

4 files changed

Lines changed: 134 additions & 2 deletions

File tree

‎slack_sdk/web/async_client.py‎

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎slack_sdk/web/client.py‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5638,6 +5638,49 @@ def slackbot_skills_info(
56385638
kwargs.update({"skill_id": skill_id})
56395639
return self.api_call("slackbot.skills.info", params=kwargs)
56405640

5641+
def slackbot_skills_update(
5642+
self,
5643+
*,
5644+
skill_id: str,
5645+
display_name: Optional[str] = None,
5646+
instructions: Optional[str] = None,
5647+
description: Optional[str] = None,
5648+
category: Optional[str] = None,
5649+
example_prompt: Optional[str] = None,
5650+
mcp_servers: Optional[Union[str, Sequence[Dict[str, Any]]]] = None,
5651+
**kwargs,
5652+
) -> SlackResponse:
5653+
"""Changes a Slackbot skill's instructions or metadata.
5654+
5655+
Only the inputs you send are changed; a call that changes nothing succeeds without writing.
5656+
5657+
https://docs.slack.dev/reference/methods/slackbot.skills.update
5658+
5659+
Args:
5660+
skill_id: Skill to change.
5661+
display_name: Human-readable label. Max 255 characters.
5662+
instructions: Markdown that replaces the whole document.
5663+
description: When Slackbot should use the skill. Max 400 characters. Send an empty string to clear.
5664+
category: One of the skill categories. Send an empty string to clear.
5665+
example_prompt: Max 200 characters. May contain `{skill}`. Send an empty string to clear.
5666+
mcp_servers: Apps the skill needs. Replaces the whole list; send `[]` to clear.
5667+
"""
5668+
kwargs.update(
5669+
{
5670+
"skill_id": skill_id,
5671+
"display_name": display_name,
5672+
"instructions": instructions,
5673+
"description": description,
5674+
"category": category,
5675+
"example_prompt": example_prompt,
5676+
}
5677+
)
5678+
if isinstance(mcp_servers, (list, tuple)):
5679+
kwargs.update({"mcp_servers": json.dumps(mcp_servers)})
5680+
else:
5681+
kwargs.update({"mcp_servers": mcp_servers})
5682+
return self.api_call("slackbot.skills.update", params=kwargs)
5683+
56415684
def slackLists_access_delete(
56425685
self,
56435686
*,

‎slack_sdk/web/legacy_client.py‎

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)