Add documentation endpoint for information about operations to create MCP possiblities #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.