Skip to content

Add documentation endpoint for information about operations to create MCP possiblities#78

Open
GhostDog98 wants to merge 3 commits intogchq:masterfrom
GhostDog98:master
Open

Add documentation endpoint for information about operations to create MCP possiblities#78
GhostDog98 wants to merge 3 commits intogchq:masterfrom
GhostDog98:master

Conversation

@GhostDog98
Copy link
Contributor

This PR adds a new endpoint, /docs.
The description for this endpoint is: "Given the name of an operation, returns a json-formatted string containing the operation's documentation. The endpoint does not return documentation for any operations that may be called by the specified operation (for example, operations called by a "Magic" operation)."
An example request may look like:

curl -X 'POST' \
  'http://localhost:3000/docs' \
  -H 'accept: text/plain' \
  -H 'Content-Type: application/json' \
  -d '{
  "operation": "md5"
}'

And a sample response:

[
  {
    "module": "Crypto",
    "description": "MD5 (Message-Digest 5) is a widely used hash function. It has been used in a variety of security applications and is also commonly used to check the integrity of files.<br><br>However, MD5 is not collision resistant and it isn't suitable for applications like SSL/TLS certificates or digital signatures that rely on this property.",
    "infoURL": "https://wikipedia.org/wiki/MD5",
    "inputType": "ArrayBuffer",
    "outputType": "string",
    "flowControl": false,
    "manualBake": false,
    "args": [],
    "name": "MD5"
  }
]

My motivation for this PR is that this would allow an LLM to use cyberchef as a managed context protocol provider very easily, which would greatly improve its abilities.

@CLAassistant
Copy link

CLAassistant commented Sep 22, 2025

CLA assistant check
All committers have signed the CLA.

Changed email associated with commit
updated swagger, changed email
@GhostDog98
Copy link
Contributor Author

Apologies for the delay and force push rebase, I had to change the username i signed my commits with.

@GhostDog98
Copy link
Contributor Author

I'll be closing this for the time being due to #79 as that is far more pressing. Will reopen one that gets merged.

@GhostDog98 GhostDog98 closed this Nov 5, 2025
@GCHQDeveloper581
Copy link
Contributor

Reopening as #79 has now been merged.

@GhostDog98
Copy link
Contributor Author

Cheers! I'll probably have another look over this PR on monday and triple check everything works as expected with my changes introduced in #79 :)

Copy link
Contributor

@GCHQDeveloper581 GCHQDeveloper581 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the linting error please?

Otherwise looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants