Skip to main content
Glama

update_protocol_description

Modify the description of an existing scientific protocol on protocols.io using its unique identifier to maintain accurate documentation.

Instructions

Update the description of an existing protocol by its protocol ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protocol_idYesUnique identifier for the protocol
descriptionYesNew description for the protocol (plain text only)

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the logic to update a protocol's description by making PUT and GET requests to the protocols.io API, returning the updated protocol or an error.
    @mcp.tool() async def update_protocol_description( protocol_id: Annotated[int, Field(description="Unique identifier for the protocol")], description: Annotated[str, Field(description="New description for the protocol (plain text only)")] ) -> Protocol | ErrorMessage: """ Update the description of an existing protocol by its protocol ID. """ data = {"description": description} response_update_protocol = await helpers.access_protocols_io_resource("PUT", f"/v4/protocols/{protocol_id}", data) if response_update_protocol["status_code"] != 0: return ErrorMessage.from_string(response_update_protocol["status_text"]) response_get_protocol = await helpers.access_protocols_io_resource("GET", f"/v4/protocols/{protocol_id}") if response_get_protocol["status_code"] != 0: return ErrorMessage.from_string(response_get_protocol["status_text"]) protocol = await Protocol.from_protocol_id(response_get_protocol["payload"]["id"]) return protocol
  • Input schema defined via Annotated types for protocol_id (int) and description (str), with output union of Protocol or ErrorMessage models.
    protocol_id: Annotated[int, Field(description="Unique identifier for the protocol")], description: Annotated[str, Field(description="New description for the protocol (plain text only)")] ) -> Protocol | ErrorMessage:
  • The @mcp.tool() decorator registers this function as an MCP tool named 'update_protocol_description'.
    @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hqn21/protocols-io-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server